List SearchResult with more info

Author Message

K259

Wednesday 03 August 2005 5:10:06 am

In our search we list title, when content is updated and parent title, but we also want to have some more text from the description attribute, i.e. 2 lines from the text which makes it all easier to see what the text is all about..

I use:
{attribute_view_gui attribute=$SearchResult:item.data_map.description}

But get all the text..does anyone know how I can get only 2 lines pr. ResultItem?

Tnx in advance

David Eriksson

Wednesday 03 August 2005 5:41:25 am

You can use template operator shorten to shorten the text to a specified number of characters. It also automatically appends "...".

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/strings/shorten

/David

K259

Wednesday 03 August 2005 5:52:53 am

Hi tnx

I tried:
{attribute_view_gui attribute=$SearchResult:item.data_map.description|shorten( 15 )}
but without success.. maybe it doesn't work with attribute_view_gui?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.