Community Documentation

ARCHIVE: Example: How to Display a Summary View as a Comma Separated List

Last updated March 26, 2011. Created by merlinofchaos on December 29, 2005.
Edited by linclark, sepeck. Log in to edit this page.

Sometimes the table is just not what you want there, but neither do you want one line per page. With this version of the summary you may want it embedded somewhere, because you may run into trouble with page-sizing. See the embedding example.

<?php
function phptemplate_views_summary_VIEWNAME($view, $type, $level, $nodes, $args) {
  foreach (
$nodes as $node) {
   
$item = views_get_summary_link($view->argument[$level]['type'], $node, $base);
  }
 
$output = theme('links', ', ');

  return
$output;
}
?>

About this page

Drupal version
Drupal 4.7.x

Archive

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.
nobody click here