eZ Community » Forums » General » All available variables in template!?
expandshrink

All available variables in template!?

All available variables in template!?

Wednesday 14 May 2003 4:05:20 pm - 4 replies

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?)

Wednesday 14 May 2003 7:40:58 pm

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)}

Thursday 15 May 2003 2:37:28 am

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?

Modified on Thursday 15 May 2003 2:38:51 am by Kaiko Kaur

Thursday 15 May 2003 10: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.

Friday 16 May 2003 6:56:45 am

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.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from