Community Documentation

D5 - Using the Views Theme Wizard

Last updated March 24, 2011. Created by JohnAlbin on February 10, 2008.
Edited by Christopher Jam..., SLIU, Wolfflow, VM. Log in to edit this page.

Support for sub-themes is poor in Drupal 5, so Zen bends the rules to get decent support for its sub-themes. This bending causes some minor issues with the Views Theme Wizard 5.x-1.6 that are pretty easy to fix.

When the Views Theme Wizard generates your view’s php code, you’ll need to change a few lines.

  1. Search for:
      _phptemplate_callback('views-list-VIEWNAME', $vars);
    and change it to:
      _phptemplate_callback('views_list_VIEWNAME', $vars, array('views-list-VIEWNAME'));

    Note the change from dashes to underscores in the first parameter.

  2. Search for:
      drupal_add_css(path_to_theme() .'/views-list-VIEWNAME.css');
    and change it to:
      drupal_add_css(path_to_subtheme() .'/views-list-VIEWNAME.css', 'theme');

    Note the function name change in the first parameter.

 

Note: see also Theme Wizard: _phptemplate_callback()