Hi All,
I'm quite new to drupal(around 3 weeks now and loving every minute of it:-) ) and have successfully themed a node to how I want. I am now using a view(table type) on taxonomy and would like to overide its default theming. I have read all that I can find on the theming page http://drupal.org/node/42597
All I'm after is access to the fields on each row. So when I get
StockID : Price : image: description: type :
222 : 45 : 2.gif : old : small
443 : 22 : 5.gif : newish : large
I would like to be able to space the fields out, add in a $ sign in front of the price. Maybe apply some css to it.
I have defined an overide function in template.php and can remove the output completely by commenting out the cell[data] field.
function phptemplate_views_view_table_taxonomy_term($view, $nodes, $type) {
$fields = _views_get_fields();
foreach ($nodes as $node) {
$row = array();
foreach ($view->field as $field) {
$cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node,$view);
$cell['class'] = "view-field view-field-$field[queryname]";
$row[] = $cell;
}
$rows[] = $row;
}
return theme('table', $view->table_header, $rows);
}
From here I'm not sure exactly how to overide the the theming of the fields and am guessing I need to do something with this cell[data] field. I'm pretty sure it will be something simple but it is not obvious to me.