Node id for modules beside the content module

Author Message

Eirik Alfstad Johansen

Monday 08 December 2003 1:24:58 am

Hi,

I have a switch block in the template code of my pagelayout.tpl which displays a graphic bar if the node currently being viewed equals 2 (the main page). The problem occurs, however, when pages that are part of other modules besides the content module are displayed. These pages seem to use 2 as a node default value, causing the graphic bar to appear where it shouldn't.

Does anyone have any idea of how to get around this?

Thanks in advance !

Sincerly,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Volker Lenz

Monday 08 December 2003 9:38:16 am

I also attempted to evaluate module-parameters in pagelayout.tpl to obtain some context-sensitivity.
Well, after quite some weeks of inquiry, trial & error to find a reliable set of module-parameters available in pagelayout.tpl, I came to acknowledge that there is no such set of parameters. Each module sends a custom API to $module_result, $Design_Keys or $view_parameters. Sometimes a parameter is there, sometimes not. As a result, I resorted to writing design extensions which calculate required params for my pagelayout.tpls. Another approach to create context-sensitive pagelayout with less programming effort is to design a set of module-dependent pagelayout_module.tpl's and let ezp choose them by override-rules, which is much more reliable than trying to access module-parameters.
Think about it. It may save you much of the trouble I went through.

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 18 2025 11:01:18
Script start
Timing: Jan 18 2025 11:01:18
Module start 'layout'
Timing: Jan 18 2025 11:01:18
Module start 'content'
Timing: Jan 18 2025 11:01:19
Module end 'content'
Timing: Jan 18 2025 11:01:19
Script end

Main resources:

Total runtime0.8641 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.1641152.6406
Module start 'layout' 0.00630.0039 741.804739.4766
Module start 'content' 0.01020.8522 781.2813530.5469
Module end 'content' 0.86240.0017 1,311.82818.1250
Script end 0.8641  1,319.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4070160.0002
Check MTime0.00140.1639160.0001
Mysql Total
Database connection0.00070.083510.0007
Mysqli_queries0.817094.5470540.0151
Looping result0.00060.0718520.0000
Template Total0.827695.820.4138
Template load0.00220.256920.0011
Template processing0.825395.511320.4127
Template load and register function0.00010.014310.0001
states
state_id_array0.00180.203810.0018
state_identifier_array0.00250.294020.0013
Override
Cache load0.00180.2033170.0001
Sytem overhead
Fetch class attribute can translate value0.00090.103720.0004
Fetch class attribute name0.00110.123940.0003
XML
Image XML parsing0.00090.101720.0004
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00090.1038220.0000
String conversion0.00000.001240.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/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
2content/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