Variables available in each module/view template override

Author Message

Michael Scofield

Thursday 05 June 2008 1:34:02 am

I'm trying to find some reference documentation about the variables available in each module/view, when doing a template override.

For example, I would like to know all the variables I can use inside a template override for "user/register".

For node templates (using "content/view") it's pretty easy because everything is inside the $node variable. But what about the other modules and views?

Is there some writing about that, I couldn't find anything!

Thks in advance
Michael Scofield

Kristof Coomans

Thursday 05 June 2008 3:02:27 am

Hi Michael

You broke out of prison again? ;)

In the template that you want to override, you can use {$DesignKeys:used|attribute(show)} to see the available override conditions.

I recently added an enhancement request to get this mentioned in the documentation somewhere: http://issues.ez.no/12094

As for the variables available in the template, you can use this extension (didn't test it yet but if it does what it says then it's what you're looking for): http://projects.ez.no/show_variables

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Michael Scofield

Thursday 05 June 2008 11:15:19 pm

Hey,

Thank you a lot. The extension was exactly what I was looking for.

Just tested in my Ez Publish installation and worked very fine.

The information about DesignKeys was very helpfull to.

Michael Scofield

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 31 2025 04:18:08
Script start
Timing: Jan 31 2025 04:18:08
Module start 'layout'
Timing: Jan 31 2025 04:18:08
Module start 'content'
Timing: Jan 31 2025 04:18:08
Module end 'content'
Timing: Jan 31 2025 04:18:08
Script end

Main resources:

Total runtime0.0150 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.3906151.2422
Module start 'layout' 0.00500.0023 739.632836.7109
Module start 'content' 0.00730.0062 776.343890.2188
Module end 'content' 0.01350.0014 866.562533.9922
Script end 0.0150  900.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002415.6694140.0002
Check MTime0.00106.9478140.0001
Mysql Total
Database connection0.00085.655110.0008
Mysqli_queries0.002315.199330.0008
Looping result0.00000.066710.0000
Template Total0.00117.510.0011
Template load0.00085.588410.0008
Template processing0.00031.891410.0003
Override
Cache load0.00063.995610.0006
General
dbfile0.002114.213180.0003
String conversion0.00000.039740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs