Finding objectclass ID in templates

Author Message

Yvan Cottyn

Thursday 18 September 2003 5:33:28 am

Hi all,

I'm trying to get the content class ID from stuff i fetched in a template.
I can find similar php code but not a template example/docs. Here is what i'm trying to do:

{section name=Thing loop=$stuff_i_fetched}
{switch match=$Thing:item.???????????}
{case match=x}
Thing is of contentclass with ID x so we do this ....
{/case}
{case}
else we do the default
{/case}
{/switch}
{/section}

Anyone can replace the question marks with what i am looking for?

TIA
vanne

Yvan Cottyn

Thursday 18 September 2003 5:56:26 am

wrong list, sorry guys

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 18 2025 21:14:35
Script start
Timing: Jan 18 2025 21:14:35
Module start 'layout'
Timing: Jan 18 2025 21:14:35
Module start 'content'
Timing: Jan 18 2025 21:14:36
Module end 'content'
Timing: Jan 18 2025 21:14:36
Script end

Main resources:

Total runtime0.8510 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.0391152.6406
Module start 'layout' 0.00590.0027 740.679739.4766
Module start 'content' 0.00850.8410 780.1563426.1172
Module end 'content' 0.84950.0015 1,206.27348.1406
Script end 0.8510  1,214.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3913160.0002
Check MTime0.00130.1499160.0001
Mysql Total
Database connection0.00060.074610.0006
Mysqli_queries0.808494.9993520.0155
Looping result0.00050.0636500.0000
Template Total0.818696.220.4093
Template load0.00210.242120.0010
Template processing0.816595.943320.4082
Template load and register function0.00040.046610.0004
states
state_id_array0.00100.112110.0010
state_identifier_array0.00210.250920.0011
Override
Cache load0.00200.2297210.0001
Sytem overhead
Fetch class attribute can translate value0.00070.082510.0007
Fetch class attribute name0.00370.431820.0018
XML
Image XML parsing0.00010.012810.0001
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00070.0790100.0001
String conversion0.00000.001140.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs