How to fetch attributes of a node

Author Message

Ashwini V

Thursday 03 March 2005 9:26:01 pm

Hi,

I need to fetch a attribute sys_admin from the folder class. I have entered the data for this attribute, however, I am not able to fetch the data. I am using $node.data_map.sys_admin.data_text to fetch the content. But this doesnt return anything? I had designed the class in 3.2 version. This code is working fine in 3.2 site, but it doesnt return anything in 3.5. How can I fetch the value of this attribute?

Thanks
Ashwini

Ɓukasz Serwatka

Thursday 03 March 2005 10:04:13 pm

Hi Karthik,

You can use attribute_view_gui

For example:

{attribute_view_gui attribute=$node.object.data_map.sys_admin}

To view all attributes of current node you can use
{$node|attribute(show)}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eirik Alfstad Johansen

Thursday 03 March 2005 10:08:51 pm

Hi Karthik,

I too have experienced template code that has stopped working due to an upgrade to 3.5. So far, it has either been caused by an error in the template syntax (like a missing {/let}), or that I've used $node.object.data_map (when I changed to $node.datamap, it has worked).

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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 04:33:24
Script start
Timing: Jan 31 2025 04:33:24
Module start 'layout'
Timing: Jan 31 2025 04:33:24
Module start 'content'
Timing: Jan 31 2025 04:33:24
Module end 'content'
Timing: Jan 31 2025 04:33:24
Script end

Main resources:

Total runtime0.0132 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.0039 588.1406151.2109
Module start 'layout' 0.00390.0027 739.351636.6641
Module start 'content' 0.00660.0051 776.015690.2813
Module end 'content' 0.01180.0014 866.296933.9922
Script end 0.0132  900.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002216.8907140.0002
Check MTime0.00107.9352140.0001
Mysql Total
Database connection0.00053.733410.0005
Mysqli_queries0.002418.457130.0008
Looping result0.00000.104910.0000
Template Total0.00118.110.0011
Template load0.00086.265710.0008
Template processing0.00021.783510.0002
Override
Cache load0.00064.368310.0006
General
dbfile0.00107.258880.0001
String conversion0.00000.057940.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