[dev] patch to make customized templates without changing default
templates possible
Morton Jonuschat
morton+dev at jonuschat.de
Wed Jan 15 01:00:43 PST 2003
While I was digging throught the source code of the horde framework to
find out how to change the horde framework menus to appear on the left
side of the screen (corporate design issues) I came to notice that
there was no easy way to change the templates without changing the
default templates delivered with horde or one of the applications.
Attached to this mail is patch that adds a single function to
lib/Horde.php to add the function Horde::getTemplate. The function
checks if a local/customized version of the file exists and either
returns the filename of the customized template or the application default.
The applications that usually use some form of the call "require
HORDE_TEMPLATES . '/common-footer.inc';" would need to be changed to
"require Horde::getTemplate('/common-footer.inc');".
The performance impact should be bearable since most of the
file_exists() calls should be caught by the php stat-cache.
I've done a proof-of-concept on the admin-part of the horde framework
plus a few pages within imp and nag to verify the function works in
other applications aswell.
--
Morton Jonuschat <morton at jonuschat.de>
-------------- next part --------------
z'µìmjÛZrܲÇ+¹¶ÞtÖ¦z+uë^Zµçb}ôò¥æ©¦Xjبú
µël¶·(³{^7õ¼zÀÞ±É赫ÚVå+m§ÿåËlÝzàýªÜ+Þ³÷^¿öµ§!éí³ý´Ó}5×öñß9i½ÿÝzצ¦Vzã
More information about the dev
mailing list