Trouble with using object attribute

Author Message

Pavel Konovalov

Thursday 02 November 2006 8:30:59 am

Hi 2 all.
I have some trouble when i want get object attribute.
I have the object with type: ezcontentobject.
This object have the attribute 'description'
How can I use this attribute in template?

Are you gangsters?!
No, we are Russians.

Vytautas Germanavičius

Thursday 02 November 2006 9:21:57 am

Simply write:

{$my_object.data_map.description.content} 

If you do not know, what attributes object has, you can write

{$my_object|attribute(show, 3)}

3 means how much level it has to be printed.

{set-block scope=root variable=cache_ttl}0{/set-block}

Pavel Konovalov

Thursday 02 November 2006 9:34:44 am

Hmm...
I used this construction, but result looks like this: Object(ezxmltext) .

Are you gangsters?!
No, we are Russians.

Vytautas Germanavičius

Thursday 02 November 2006 10:16:45 am

a! description is of xml block type.
In this case you need to use:

{$my_object.data_map.description.content.output.output_text}

 

Look to http://ez.no/doc/ez_publish/technical_manual/3_8/templates/information_extraction/outputting_node_and_object_data

{set-block scope=root variable=cache_ttl}0{/set-block}

Pavel Konovalov

Thursday 02 November 2006 10:36:47 am

Thx!!!
But I have one question one another question:)
Where I can tune option to send letters like HTML text, nor ordinary text.

Are you gangsters?!
No, we are Russians.

Pavel Konovalov

Thursday 02 November 2006 10:58:40 am

Dont warry!
I solve my problem myself.
:)

Are you gangsters?!
No, we are Russians.

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