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?

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

eZ debug

Timing: Jan 19 2025 09:41:27
Script start
Timing: Jan 19 2025 09:41:27
Module start 'layout'
Timing: Jan 19 2025 09:41:27
Module start 'content'
Timing: Jan 19 2025 09:41:28
Module end 'content'
Timing: Jan 19 2025 09:41:28
Script end

Main resources:

Total runtime1.3892 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.2734152.6406
Module start 'layout' 0.00620.0038 741.914139.4766
Module start 'content' 0.01001.3778 781.3906495.9375
Module end 'content' 1.38780.0014 1,277.32818.1406
Script end 1.3892  1,285.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2450160.0002
Check MTime0.00140.0997160.0001
Mysql Total
Database connection0.00110.082410.0011
Mysqli_queries1.343696.7198570.0236
Looping result0.00060.0414550.0000
Template Total1.352997.420.6765
Template load0.00220.155920.0011
Template processing1.350897.231720.6754
Template load and register function0.00040.028410.0004
states
state_id_array0.00260.185110.0026
state_identifier_array0.00160.112520.0008
Override
Cache load0.00170.1257150.0001
Sytem overhead
Fetch class attribute can translate value0.00080.054520.0004
Fetch class attribute name0.00120.084030.0004
XML
Image XML parsing0.00020.017420.0001
class_abstraction
Instantiating content class attribute0.00000.000630.0000
General
dbfile0.00070.0531100.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs