shorten operator don't display text

Author Message

K259

Wednesday 03 August 2005 6:00:11 am

I try to shorten the text displayed with:
{attribute_view_gui attribute=$SearchResult:item.data_map.description|shorten( 15 )}

But I don't think that |shorten works with atribute_view_gui..I don't get any output with just
{$SearchResult:item.data_map.description} so I have to use the attribute_view_gui.

Does anyone know how to solve this?

Guillaume Kempfer

Thursday 04 August 2005 1:10:45 am

Hi,

You cannot do that.
If you want to do that you should create an override of "design/standard/content/searchresult.tpl"

K259

Thursday 04 August 2005 1:43:53 am

Hmm..but do you know how I can output text in a template with the use of this shorten-operator?

I tried:
{$SearchResult:item.data_map.description|shorten(15)}
but it don't output anything..

This works:
{attribute_view_gui attribute=$SearchResult:item.data_map.description}
but then I get all the text from the description field, which makes the searchresultpage a mess..

Paul Borgermans

Thursday 04 August 2005 3:02:24 am

It is possible, look for example this thread:

http://ez.no/community/forum/setup_design/shorten_operator_with_viewing_attributes

You will need to define the striptags template operator (also explained there) if it is about shortening xml attributes. Simple text is simpler.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

K259

Thursday 04 August 2005 3:16:35 am

Tnx. Just what I needed, but couldn't find it in the ez search.

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