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.