Posted By

aleprieto on 08/12/08


Tagged

template drupal phptemplate


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

basicmagic
dvdrtrgn
jodm


Drupal tip: Stripping out nested divs in views blocks


 / Published in: PHP
 

URL: http://urlgreyhot.com/personal/weblog/drupal_tip_stripping_out_nested_divs_in_views_blocks

  1. function phptemplate_views_view_list($view, $nodes, $type) {
  2. $fields = _views_get_fields();
  3. foreach ($nodes as $node) {
  4. $item = '';
  5. foreach ($view->field as $field) {
  6. if ($field['label']) {
  7. $item .= '<div class="view-label view-label-$field[queryname]">'. $field['label'] ."</div>";
  8. }
  9. $item .= views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view) . "<br />";
  10. }
  11. $items[] = "$item"; // l($node->title, "node/$node->nid");
  12. }
  13. if ($items) {
  14. return theme('item_list', $items);
  15. }
  16. }

Report this snippet  

You need to login to post a comment.