Hi, I've just upgraded a Drupal site from 5.x to 6.14 and am having trouble with theming. My theme is called "transport3" and I have put the following code into "template.php" (I already have an .info file for the theme):
function transport3_theme () {
return array(
'transport3_views_view_list_top_news3' => array(
'template' => 'views-list-top_news3', // The template file name, without .tpl.php
'arguments' => array(
'variable1' => null,
'variable2' => null, // Declare as many variables as you like here, setting them all to null
'variable3' => null,
),
)
);
}
and
function transport3_views_view_list_top_news3($view,$nodes,$type) {
return my_views_top_news('views-top_news3','views-list-top_news3',$view, $nodes, $type);
}
which calls:
function my_views_top_news($template1,$template2,$view, $nodes, $type) {
$fields = _views_get_fields();
$taken = array();
// Set up the fields in nicely named chunks.
foreach ($view->field as $id => $field) {
$field_name = $field['field'];
if (isset($taken[$field_name])) {
$field_name = $field['queryname'];
}
$taken[$field_name] = true;
$field_names[$id] = $field_name;
}
// Set up some variables that won't change.
$base_vars = array(
'view' => $view,
'view_type' => $type,
);