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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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?