I have created views based on the theme wizard and I have tried to customise the view with a header and footer.
In the case of the header I check for the count variable = 0 then I output the header. When it comes to the last item on the page is there a variable that can be used to detect that it is the last page so that I can output the footer?
if ($count == 0)
include('views-list-ad_wbseditview_list-header.tpl.php');
Below is the code in the xxx.tpl.php file. What I'd like to know is which variables can be used to determine what page and what row is being printed.
<?php
function phptemplate_views_view_list_ad_wbseditview_list($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,
);
foreach ($nodes as $i => $node) {
$vars = $base_vars;
$vars['node'] = $node;
$vars['count'] = $i;
$vars['stripe'] = $i % 2 ? 'even' : 'odd';
foreach ($view->field as $id => $field) {