Variables in the extension templates

Author Message

Sergei Chusmah

Wednesday 22 August 2007 5:00:49 am

There are some variables which should be present in the templates (like $language_code or $module_result, etc.) and are not there when I'm viewing my custom extensions templates.

Do I need to set up something for them to be available to my extensions?

Thanks!

André R.

Wednesday 22 August 2007 10:18:49 am

yes, look up kernel/content/view.php for how it's done.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Sergei Chusmah

Thursday 23 August 2007 1:01:28 am

Many thanks!

I'm still having a problem, though...
I have followed view.php and now the vars are available in the content of my extension pages, but I need some of the vars to be present in the header template (called from pagelayout.tpl) and they are not (e.g. languageCode)

By the way, is there some docs about the way pages are built? i.e. from index.php to including modules' code and setting the vars to the templates, etc. it would be great so i could learn these kind of things...

Thanks!

EDIT: i solved the problem, just waas lacking some setVariable statements... But I still would like to see some docs about page biulding mechanism anyway...

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 19 2025 00:06:58
Script start
Timing: Jan 19 2025 00:06:58
Module start 'layout'
Timing: Jan 19 2025 00:06:58
Module start 'content'
Timing: Jan 19 2025 00:06:59
Module end 'content'
Timing: Jan 19 2025 00:06:59
Script end

Main resources:

Total runtime1.2588 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.9141152.6250
Module start 'layout' 0.00670.0034 740.539139.4609
Module start 'content' 0.01021.2472 780.0000532.8438
Module end 'content' 1.25740.0014 1,312.843812.1563
Script end 1.2587  1,325.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2769160.0002
Check MTime0.00140.1145160.0001
Mysql Total
Database connection0.00060.046110.0006
Mysqli_queries1.205595.7688570.0211
Looping result0.00070.0566550.0000
Template Total1.207195.920.6035
Template load0.00200.155720.0010
Template processing1.205195.734520.6025
Template load and register function0.00020.015010.0002
states
state_id_array0.00420.331310.0042
state_identifier_array0.00170.134920.0008
Override
Cache load0.00160.1289160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.048520.0003
Fetch class attribute name0.00110.090640.0003
XML
Image XML parsing0.00070.052420.0003
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00770.6142170.0005
String conversion0.00000.002540.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/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
1content/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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs