Return to Snippet

Revision: 8069
at September 1, 2008 14:20 by aleprieto


Initial Code
<?php
function THEMENAME_views_view_list_VIEWNAME($view, $nodes, $type) {
  foreach ($nodes as $node) {
    $output .= "<li class='leaf'>" . l($node->node_title, "node/$node->nid") . "</li>\n";
  }

  if ($output) {
    return "<div class='menu'>\n<ul>\n" . $output . '</ul></div>';
  }
}
?>

Initial URL

                                

Initial Description

                                

Initial Title
Drupal theming list Views to display like menus

Initial Tags
template, module, drupal

Initial Language
PHP