Display long name in template

Author Message

Andreas Kaiser

Monday 30 October 2006 2:26:06 am

I'm creating my first templates in eZ Publish. One is a dynamic menu and when I use the code:

{$:item.name}

to call the name of the item, the short name (instead of the long name of the item) is used.

How should I call the long name of the item?

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

Mark Marsiglio

Monday 30 October 2006 4:27:32 am

The short name is a special node "name" that is set as the identifier of the node.

The long name is usually a different attribute (most commonly a text line) that has to be called as an attribute.

I usually use something like:

{$node.object.data_map.name.content|wash()}

where "name" is the name of the attribute that contains the long name.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Andreas Kaiser

Monday 30 October 2006 7:38:38 am

Thanks it works!

I had to change a lot of fetches, but this way seo will be better in the template.

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

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 18 2025 16:15:10
Script start
Timing: Jan 18 2025 16:15:10
Module start 'layout'
Timing: Jan 18 2025 16:15:10
Module start 'content'
Timing: Jan 18 2025 16:15:12
Module end 'content'
Timing: Jan 18 2025 16:15:12
Script end

Main resources:

Total runtime1.5111 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.0059 589.0313152.6250
Module start 'layout' 0.00590.0033 741.656339.4453
Module start 'content' 0.00921.5005 781.1016541.2891
Module end 'content' 1.50980.0013 1,322.390612.1641
Script end 1.5111  1,334.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2188160.0002
Check MTime0.00140.0919160.0001
Mysql Total
Database connection0.00070.044810.0007
Mysqli_queries1.457996.4805570.0256
Looping result0.00070.0467550.0000
Template Total1.467597.120.7338
Template load0.00220.143720.0011
Template processing1.465396.972120.7327
Template load and register function0.00010.007310.0001
states
state_id_array0.00200.134110.0020
state_identifier_array0.00480.318820.0024
Override
Cache load0.00180.1201190.0001
Sytem overhead
Fetch class attribute can translate value0.00080.054420.0004
Fetch class attribute name0.00160.108550.0003
XML
Image XML parsing0.00100.065520.0005
class_abstraction
Instantiating content class attribute0.00000.000960.0000
General
dbfile0.00230.1508210.0001
String conversion0.00000.000640.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs