[development] override theme of another module
Steve Ringwood
nevets at mailbag.com
Thu Sep 27 19:56:34 UTC 2007
Hi,
Maybe this will help
Normally if one has a module, lets call it mymodule
then one would provide theming functions along the lines of
function theme_module_page(...) {
}
function theme_module_paragraph(...) {
}
Then when calling these functions one would use
theme('module_page', ...);
and
theme('module_paragraph', ...);
The theme function is the key here, it not only provides
the override mechanism but also only makes a function call
if it finds an valid theme function. So there is no need
for the caller to do any checking.
Then in using phptemplates one can override with either
function phptemplate_module_page(...) {
}
or
function themename_module_page(...) {
}
(I think there are similiar ways using the other template engines)
Nevets
More information about the development
mailing list