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.

eZ debug

Timing: Jan 31 2025 08:21:04
Script start
Timing: Jan 31 2025 08:21:04
Module start 'layout'
Timing: Jan 31 2025 08:21:04
Module start 'content'
Timing: Jan 31 2025 08:21:04
Module end 'content'
Timing: Jan 31 2025 08:21:04
Script end

Main resources:

Total runtime0.0179 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 588.1563151.2109
Module start 'layout' 0.00680.0029 739.367236.6484
Module start 'content' 0.00980.0069 776.015694.2813
Module end 'content' 0.01670.0012 870.296937.9922
Script end 0.0179  908.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002312.6801140.0002
Check MTime0.00116.1504140.0001
Mysql Total
Database connection0.00126.954210.0012
Mysqli_queries0.003620.086830.0012
Looping result0.00000.073210.0000
Template Total0.00094.910.0009
Template load0.00073.861710.0007
Template processing0.00020.988710.0002
Override
Cache load0.00052.701310.0005
General
dbfile0.002513.916480.0003
String conversion0.00000.037340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs