Incoherence in parameter access?

Author Message

Massimiliano Bariola

Thursday 04 August 2005 3:39:30 am

With reference to this documentation page:

http://ez.no/doc/ez_publish/technical_manual/3_6/templates/basic_template_tasks

In my eZ project, I have:
- explicitly overridden templates,
- implicitly overridden templates (like pagelayout.tpl, which do not need an explicit entry in override.ini.append)
- templates used by my custom extension.

I noticed that, to access user parameters in templates passed like /..../(varname)/varvalue I have to use $view_parameters.varname for override templates, and $view_parameters.Userparameters.varname for my extension templates .

This seems incoherent to me. Maybe I am doing something wrong? my vanilla php code for extension templates goes like this:


<?

include_once( 'kernel/common/template.php'  );

$tpl = & templateInit();
$tpl->setVariable('view_parameters', $Params);

$Result = array();
$Result['content'] = &$tpl->fetch( 'design:wt/classifiche.tpl' );
$Result['path'] = array( array( 'url' => false,
				'text' => 'Le classifiche'  )  );

?>

If this is a desired behavior, I think it needs to be documented.

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 20 2025 10:47:17
Script start
Timing: Jan 20 2025 10:47:17
Module start 'layout'
Timing: Jan 20 2025 10:47:17
Module start 'content'
Timing: Jan 20 2025 10:47:19
Module end 'content'
Timing: Jan 20 2025 10:47:19
Script end

Main resources:

Total runtime1.0970 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 590.2734152.6250
Module start 'layout' 0.00520.0032 742.898439.4453
Module start 'content' 0.00831.0877 782.3438442.2422
Module end 'content' 1.09600.0010 1,224.58598.3125
Script end 1.0970  1,232.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3043160.0002
Check MTime0.00130.1212160.0001
Mysql Total
Database connection0.00060.058610.0006
Mysqli_queries1.059696.5846460.0230
Looping result0.00030.0314440.0000
Template Total1.062396.820.5312
Template load0.00240.214720.0012
Template processing1.060096.622120.5300
Template load and register function0.00010.010110.0001
states
state_id_array0.00200.181210.0020
state_identifier_array0.00090.084820.0005
Override
Cache load0.00200.1809140.0001
Sytem overhead
Fetch class attribute can translate value0.00040.041010.0004
Fetch class attribute name0.00040.034420.0002
XML
Image XML parsing0.00050.046910.0005
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00260.2358170.0002
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs