Forums / Developer / Node id for modules beside the content module

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.