Brian Wolf wrote:
Hi,
I have a "view" that returns node id's . I would like to use these as "links" in the list built by the view.
Thanks, Brian
Change the world with e-mail. Join the i’m Initiative from Microsoft. http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld
Hi,
You can use a phptemplate function to override list content.
- Create a template.php file into your current theme - Add a function that override views_view_list
Example : <?php function phptemplate_views_view_list($view, $nodes, $type) { $items = array();
foreach ($nodes as $node) { $data = "<div class='view-item ". views_css_safe('view-item-'. $view->name) ."'>"; $data .= l(" a link to ".$node->nid, 'node/'.$node->nid); $data .= "</div>\n"; $items[] = $data; }
return theme('item_list', $items); } ?>
G. Saint-Genest