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.
Hi
The default unformatted view tpl file for views uses a variable named classes (views-view-unformatted.tpl.php).
This is an array of classes for each row, typically an array of the form (views-row views-row-1 views-row-odd views-row-first, views-row views-row-2 views-row-even etc).
The generic preprocess function in ninesixty robots overrides this.
From line 55:
function ninesixtyrobots_preprocess(&$vars, $hook) {
$vars['classes'] = $hook;
}
Changing this to be slightly more selective (see below) prevents the override for any views template reliant on the classes variable (there are a few):
function ninesixtyrobots_preprocess(&$vars, $hook) {
if(substr($hook, 0, 4) != 'view') {
$vars['classes'] = $hook;
}
}
Comments
Comment #1
add1sun CreditAttribution: add1sun commentedThat function has actually been removed in the latest release since it was originally included for demo purposes only. :-)