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.