All available variables in template!?

Author Message

Kaiko Kaur

Wednesday 14 May 2003 7:05:20 am

Is it possible to get list of all availables variables in template!?
I can see all attributes for one variables with attribute, but I'd like to know what variables can I use at all? (It is like php $GLOBALS maybe?)

Jo Henrik Endrerud

Wednesday 14 May 2003 10:40:58 am

The only object defined in a normal template is the $node object. You use this to fetch new variables. To show all attributes in an object you can use this command:

{$node|attribute(show)}

Jo Henrik Endrerud | System Developer @ Seeds Consulting | http://www.seeds.no

Kaiko Kaur

Wednesday 14 May 2003 5:37:28 pm

Ok, but what about other templates. Now I'm interested in custom tag template. I know there is $content, but is there some more?
Let's say I'd like to use like this <custom name="myTag" something="blahh"></custom>

Is this possible to catch this something? Is this documented somewhere?

Jan Borsodi

Thursday 15 May 2003 1:11:48 am

If you're meaning the custom tags in the xml datatype the only variable that is set is content.

For other templates it varies which variables are available, some variables are set from PHP code (like in kernel/content/view.php) while others are passed by template code.

There's no documentation of which variables are avaiable at the moment.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Scot Wilcoxon

Thursday 15 May 2003 9:56:45 pm

Another for the collection. I just stumbled across
{$DesignKeys:used|attribute(show)}
through a hint in Demo template code, although I can't find it documented. The Wiki has DesignKeys in the todo wish list as undocumented. If I understand the notation, "DesignKeys" is a namespace which contains the variable "used". Whatever "used" means...I think it is not an abbreviation for "used up", so probably "used by" something. Something.

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 05:03:14
Script start
Timing: Jan 18 2025 05:03:14
Module start 'layout'
Timing: Jan 18 2025 05:03:14
Module start 'content'
Timing: Jan 18 2025 05:03:16
Module end 'content'
Timing: Jan 18 2025 05:03:16
Script end

Main resources:

Total runtime1.5297 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 590.2188152.6250
Module start 'layout' 0.00690.0040 742.843839.4609
Module start 'content' 0.01091.5175 782.3047620.4922
Module end 'content' 1.52840.0012 1,402.796912.1563
Script end 1.5296  1,414.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2293160.0002
Check MTime0.00140.0890160.0001
Mysql Total
Database connection0.00080.053610.0008
Mysqli_queries1.476196.5010670.0220
Looping result0.00070.0457650.0000
Template Total1.475896.520.7379
Template load0.00240.157520.0012
Template processing1.473496.323820.7367
Template load and register function0.00020.015410.0002
states
state_id_array0.00160.102710.0016
state_identifier_array0.00230.150620.0012
Override
Cache load0.00190.1270210.0001
Sytem overhead
Fetch class attribute can translate value0.00080.052440.0002
Fetch class attribute name0.00130.087560.0002
XML
Image XML parsing0.00160.104040.0004
class_abstraction
Instantiating content class attribute0.00000.000760.0000
General
dbfile0.00100.0646170.0001
String conversion0.00000.000840.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs