Forums / Developer / Trouble with using object attribute

"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".

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.