Return to Snippet

Revision: 7767
at August 12, 2008 07:22 by aleprieto


Initial Code
function phptemplate_views_view_list($view, $nodes, $type) {
  $fields = _views_get_fields();
  foreach ($nodes as $node) {
    $item = '';
    foreach ($view->field as $field) {
      if ($field['label']) {
        $item .= '<div class="view-label view-label-$field[queryname]">'. $field['label'] ."</div>";
      }
      $item .= views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view) . "<br />";
    }
    $items[] = "$item"; // l($node->title, "node/$node->nid");
  }
  if ($items) {
    return theme('item_list', $items);
  }
}

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

Initial Description


Initial Title
Drupal tip: Stripping out nested divs in views blocks

Initial Tags
template, drupal

Initial Language
PHP