Thursday 06 February 2003 2:35:38 am
> How do I return more information from an object returned in
> the search.tpl template.
>
> I want to display more than the name and uri to the object.
> For example displaying the intro field underneath.
> > Any help would be appreciated.
I suggest you create a new viewmode for content objects, create a viewmode in design/standard/override/templates/content/view/ for all classes you have, for instance search_class_1.tpl and search_class_2.tpl and add the template code to it. For instance if you have attributes called intro and body for class 1, add:
Intro: {attribute_view_gui attribute=$object.data_map.intro}
Body: {attribute_view_gui attribute=$object.data_map.body} In the search template you must loop over all returned values and do: {content_view_gui view=search content_object=$:item}
--
Amos
Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq
|