eZ Community » Forums » Setup & design » Display long name in template
expandshrink

Display long name in template

Display long name in template

Monday 30 October 2006 11:26:06 am - 2 replies

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?

Monday 30 October 2006 1:27:32 pm

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.

Monday 30 October 2006 4:38:38 pm

Thanks it works!

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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu