Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Issue #682888: $classes for views-view.tpl.php introduced in views-6.x-2.9 in template_preprocess_views_view()
the following:
// Basic classes
$vars['classes_array'] = array();
$vars['classes_array'][] = 'view';
$vars['classes_array'][] = 'view-' . views_css_safe($vars['name']);
$vars['classes_array'][] = 'view-id-' . $vars['name'];
$vars['classes_array'][] = 'view-display-id-' . $vars['display_id'];
based on zen itself, making most of zen_preprocess_views_view()
redundant.
Attached patch removes duplicates, but preserves functionality for views older than 2.9, maybe they should be removed altogether ?
Comment | File | Size | Author |
---|---|---|---|
#4 | zen-views-template-redundant-1086820-4.patch | 2.95 KB | barraponto |
template.php-redundant-classes.patch | 415 bytes | tacituseu |
Comments
Comment #1
JohnAlbinhmm…
What's the likelihood that a site would update to Zen 6.x-2.1, but not update to one of the 3 security releases of Views since 6.x-2.8? :-\
Let's just nix the whole zen_preprocess_views_view() function.
Fixed! http://drupalcode.org/project/zen.git/commit/0070489
Comment #3
joachim CreditAttribution: joachim commentedIn that case, shouldn't views-view.tpl.php be removed also?
Comment #4
barraponto CreditAttribution: barraponto commentedThere is no difference between our tpl.php and the one mantained by views. I'm removing the file as theming will get easier if we just inherit the template from views.
Comment #5
JohnAlbinwe're in bug fix mode now in 6.x-2.x branch. The tpl has been removed in the d7 versions.