This forum is for assistance with theme development.

Theming views tables - undefined variable

I am trying to theme two views tables to conditionally remove two columns depending on the node page the view is shown on. I could swear it was working yesterday on one of them. The other has another issue I will post separately. However today I am getting an undefined variable error on the one that was working. The view is "og_extras_members".

I'm using the Omega theme and have this in template.php.

function mytheme_preprocess_views_view(&$vars) {
  $view = $vars['view'];
  if($view->name == 'og_extras_members') {
    $nid = $view->args[0];
  }
  elseif ($view->name == 'og_members_admin') {
    $nid = $view->args[1];
  }
 if (isset($nid)) {
    $node = node_load($nid);
    dpm($node);
    if (isset($node)) {
      $vars['node_type'] = $node->type;
    }
    dpm($vars);
  }
}

The dpms are showing up and in the second one $vars['node_type'] is set to the expected $node->type.

I also have created "views-view-table--og-extras-members.tpl.php" in the templates sub folder of my theme and added the following inside the header and rows output sections:


foreach ($header as $field => $label):
if (!($node_type == 'organization' && ($field == 'field_member_office' || $field == 'field_member_term'))):

Template for node and book

Hi,

I'm developping a theme for my drupal website. For a specific type of content (which is in a book), I have a custom template page. I would like know how to display the book navigation int this custom template page.

Thanx for your help :)

Help me achieve a front page with tiles/panels

Hello guys,
I'm quite new to drupal and could use some help here. I decided i want my website to display three large tile on the home page linking to the various services i offer. i started by fiddling around with some css and modules like panels, but so far haven't managed to get the job done.
let me give you a presentation of how i want the website to look like:
http://engeeo.com/sites/all/themes/socialstyle/websiteexample.jpg

Theming on Categories and Ubercart Products

Hi All,
I am very beginner to drupal and just started a project.
Now i have requirement like to show categories and latest product slider on my front page.
For tat i have created taxonomy->Catalog VOCABULARY -> Added Three items means three categories are there, but here i am confused where should i theme them. I want just give them proper formatting with css classes. Next for product slider i have installed ubercart module and created example products. But here also i am not able to format them with the css.

similar theme like :

Is there a similar theme to adapt the gallery like here:
http://www.albertwatson.net/ (without flash player ...)

I need the slideshow (click f.e photographs) the count of pictures with for and back beside

maybe the fade in of the menu after the first picture, and a similar menu

Knut

How to verify which tpl file used

I'm TRYING to use theme_hook_suggestions and getting nowhere.

Pages

Subscribe with RSS Subscribe to RSS - Theme development