Community Documentation

List views without the list markup

Last updated April 13, 2007. Created by Michelle on April 13, 2007.
Log in to edit this page.

If you want a list view, but just want one item after another without the UL/LI markup, this is what you do:

1) Make a list view
2) Run the theming wizard and paste the stuff it tells you to
3) In the bit for template.php:

replace

return theme('item_list', $items);

with

return implode(" ",$items);

This will get you _just_ the stuff in the tpl file with each item separated by spaces and no list markup.

Comments

works

Thanks #10 worked like a charm. Drupal gets a lot more fun once one starts to get the hang of views.

About this page

Drupal version
Drupal 5.x

Reference

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.