Hi!
I have a code that is sitting in template.php file
function phptemplate_views_view_table ($view, $nodes, $type) {
$fields = _views_get_fields();
foreach ($nodes as $node) {
$row = array();
foreach ($view->field as $field) {
if ($fields[$field['id']]['visible'] !== FALSE) {
$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']);
$row[] = $cell;
}
}
$rows[] = $row;
}
return theme('table', $view->table_header, $rows, array('cellspacing'=>'4', 'border'=>'1'));
}
Currently in a raw I have "Taxanomy Image" "Node: Title" "Node Total Hits" "Node Author Name" "Node Created Time"
I would like to set it that "Taxanomy Image" "Node: Title" "Node Total Hits" shows in one and "Node Author Name" "Node Created Time" show second raw just below it.
I have checked http://drupal.org/node/154084 but I didn't get the idea from pingers who have posted (using $row[] = )
If you can give me a little bit more info or an example I think I can make it.
Thanks
Comments
Comment #1
werushka commentedI would really appreciate some feedback.
Comment #2
marcp commentedIt might help people visualize this if you posted a link to your site and a mockup of what you are looking for.
Comment #3
merlinofchaos commentedYou bumped your issue after nine hours? And marked this critical?
Critical is reserved for things that make your site simply not work. This is a nice to have theming feature.
This queue gets a LOT of incoming traffic and not nearly as many people helping to read it. It sometimes takes days or weeks to people to get around to this queue. If you want more exposure try the forums, but please try and understand that marking an issue like this critical and bumping it on the same day is considered rude.
Comment #4
werushka commentedhere is an example
Comment #5
werushka commentedit is totally my bad I am sorry
Comment #6
rj commentedI had 4 fields and I wanted the last field to appear on a second row. Here's what I did:
Comment #7
werushka commentedThanks for the function it works great, is it possible group two rows as a block to make it easy to theme it with a div
Comment #8
ntripcevich commentedI'm trying to something similar to this in Views 2.3. Does anyone have any code for something similar for Views2 by any chance?
I guess that this is a drupal 5 / Views1 thread so this is a hijack.
I asked something similar here for d6
http://drupal.org/node/330554
Thanks!
Comment #9
esmerel commentedsuggestion provided for original issue.