Fetch Class ID of a node

Author Message

Mahesh Arvind

Thursday 04 March 2004 10:44:00 pm

Hi,

Can anyone tell me how to fetch the Class ID of a node?

Thanks
Mahesh

Thanks & Regards
Mahesh

Tore Skobba

Friday 05 March 2004 12:54:56 am

{$node.object.contentclass_id} should do the trick

Cheers
Tore

Alex Jones

Friday 05 March 2004 6:50:01 am

Just a quick note, to find information about the attributes of an object (like the class id), try adding <i>{$node|attribute(show)}</i> to a template which will provide you a table of the information that applies to that object. From there you can easily figure out what to use in your template to display the attribute in question. From the documentation (http://ez.no/ez_publish/documentation/development/libraries/ez_template/operators/miscellaneous):

<b>attribute</b>
Helper attribute to print available methods in objects and arrays, by default it only shows the array keys and object attribute names but by passing show as parameter it will fetch the values.

The second parameter can be used to controlled the number of children to expand, default is no limit which may give problems with values that loop. The returned result is an HTML table unless false() is passed as the third parameter. E.g.

{$node|attribute(show)}, {$node|attribute(show,2,false)}

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Mahesh Arvind

Saturday 06 March 2004 12:47:02 am

Thank you Tore & Alex for the reply. It worked :)

Thanks & Regards
Mahesh

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