Forums / Setup & design / Shorten operator doesn't work at all

Shorten operator doesn't work at all

Author Message

bilal masterguide

Wednesday 17 August 2005 2:42:42 am

Here is a part of my code:

<div class="content-view-full">
    <div id="present">
    
        {def $my_node=fetch( 'content', 'node', hash( 'node_id', 93 ) )}
	{/def}
        <h1>{$my_node.object.data_map.name.content|wash()}</h1>
        {section show=$my_node.object.data_map.short_description.content.is_empty|not}
            <div class="attribute-short">
                {attribute_view_gui attribute=$my_node.object.data_map.short_description.content.output.output_text|striptags|shorten(60)}			    </div>
        {/section}

I modified the template.ini adding PHPOperatorList[striptags]=strip_tags

but I don't have my short description shortened. Can somebody tell me what could be the problem?

thx a lot

Mads Ovesen

Thursday 18 August 2005 6:38:23 am

Not exactly sure what the problem is, but the solution is

{$my_node.object.data_map.short_description.content.output.output_text|shorten(60)}

assuming short_description is an XML-field.

/m

bilal masterguide

Friday 19 August 2005 1:21:52 am

Thank you for your suggestion but unfortunatly it doesn't work ;-(

has someone an idea?