Posted By

aleprieto on 09/01/08


Tagged

template module drupal phptemplate views


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

basicmagic
wilburhimself


Drupal theming list Views to display like menus


 / Published in: PHP
 

  1. <?php
  2. function THEMENAME_views_view_list_VIEWNAME($view, $nodes, $type) {
  3. foreach ($nodes as $node) {
  4. $output .= "<li class='leaf'>" . l($node->node_title, "node/$node->nid") . "</li>\n";
  5. }
  6.  
  7. if ($output) {
  8. return "<div class='menu'>\n<ul>\n" . $output . '</ul></div>';
  9. }
  10. }
  11. ?>

Report this snippet  

You need to login to post a comment.