Monday 04 September 2006 6:24:26 am
Kristian, Kristof, Norman,
thank you all for your assistance in this, and for your helpful comments.
I'd like to sumarize what I've learned/discoverd, please one of you jump in if I'm mistaken about something.
---Templates used/called by the kernel/error view do indeed have a couple
design keys that could be used for override via override.ini(.append.php).
For all intents and purposes, however, this is not a viable method of displaying
custom error templates because there are no usable match conditions available in/for that particular view.
---kernel/error/view.php passes very (very) little useful information to the various
error_code templates, so there is nothing natively available in these templates to use for doing things like -for example- a switch/case on section.
--If, for example, our goal is to provide a custom login page for each defined section
of our public site, our most (only?) useful tack is to modify/override error/kernel/1.tpl
and to use our own control structures to provide alternate displays. From within this template there is no direct access to the section being called. Instead, we must fetch the node and get the section_id with $node.object.section_id|int().
A little dance is required, though, to fetch the node, because the only apparent information on the node being accessed is at the end of the string in the variable $redirect_uri.
Of course, it would be much cleaner and easier to alter kernel/error/view.php to pass the section_id to the error template, but then this code would have to be protected to survive version upgrades. Andy
|