Hello, I'm trying to list the taxonomy terms out in a a column but it is not printing so not sure what I did wrong, this is listed under "case 'term_node_2_name';" in the code below, which I thought "term_node_2_name" would be the variable to call. Also, I am not sure how to group tables by date created, specifically by day. My code is below for review. Using drupal 5.x and Views 1.6. Cannot upgrade the site unfortunately. Thanks for any help in advance.
function phptemplate_views_view_table_viewtest($view, $nodes, $type) {
$fields = _views_get_fields();
foreach ($nodes as $node) {
$row = array();
foreach ($view->field as $field) {
if ($fields[$field['id']]['visible'] !== FALSE) {
switch ($field['field']) {
case 'field_dog_value';
$cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
$cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']);
// Add colspan for each field, otherwise it doens't work right.
$cell['colspan'] = '1';
$row[] = $cell;
break;
case 'title';
$cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
$cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']);
$cell['colspan'] = '1';
$row[] = $cell;
break;
case 'term_node_2_name'; //taxonomy
$cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
$cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']);
// Add colspan for each field, otherwise it doens't work right.
$cell['colspan'] = '1';
$row[] = $cell;
break;
case 'field_food_value';
$cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
$cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']);
// Add colspan for each field, otherwise it doens't work right.
$cell['colspan'] = '1';
$row[] = $cell;
break;
case 'created';
$cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
$cell['class'] = "view-field ". views_css_safe('view-field-'. $field['queryname']);
// Add colspan for each field, otherwise it doens't work right.
$cell['colspan'] = '1';
$row[] = $cell;
break;
}
}
}
$rows[] = $row;
}
return theme('table', $view->table_header, $rows);
}
Comments
Comment #1
aznboy commented*bump...still haven't found anything to help me out with this
Comment #2
merlinofchaos commentedI wouldn't bother bumping issues against 5.x.
Nobody is currently supporting Views for Drupal 5.
Comment #3
aznboy commentedI see. Thanks for the notice.
Comment #4
iamjon commentedI'm marking this as closed