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.

eZ debug

Timing: Jan 19 2025 04:25:32
Script start
Timing: Jan 19 2025 04:25:32
Module start 'layout'
Timing: Jan 19 2025 04:25:32
Module start 'content'
Timing: Jan 19 2025 04:25:33
Module end 'content'
Timing: Jan 19 2025 04:25:33
Script end

Main resources:

Total runtime1.2509 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 590.2891152.6250
Module start 'layout' 0.00520.0028 742.914139.4453
Module start 'content' 0.00791.2416 782.3594587.1016
Module end 'content' 1.24960.0013 1,369.460912.1641
Script end 1.2509  1,381.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2552160.0002
Check MTime0.00140.1082160.0001
Mysql Total
Database connection0.00070.059110.0007
Mysqli_queries1.194195.4553620.0193
Looping result0.00080.0618600.0000
Template Total1.217597.320.6087
Template load0.00190.149220.0009
Template processing1.215697.176020.6078
Template load and register function0.00010.008410.0001
states
state_id_array0.00130.102110.0013
state_identifier_array0.00150.116220.0007
Override
Cache load0.00160.1275230.0001
Sytem overhead
Fetch class attribute can translate value0.00130.106830.0004
Fetch class attribute name0.00220.172760.0004
XML
Image XML parsing0.00100.079630.0003
class_abstraction
Instantiating content class attribute0.00000.001170.0000
General
dbfile0.00090.0691220.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs