[development] module_preprocess_hook not always called
Matt Connolly
matt at cabinetuk.com
Tue Jul 29 16:00:02 UTC 2008
Is there a reason why a module's preprocess function is not always
called?
I have several preprocess functions in a module, and I'd like to
preprocess certain pieces of themed content based on content types
specific to this module - so, it makes sense to me that the preprocess
code should be in the module file.
I've traced through the theme() call, and my module's preprocess
function name appears in the $hooks array.
For example, i'd like to hilight a menu, so I'm trying to preprocess
theme(links).
My theme has a theme_links function which generates the html output,
but in this case the preprocess function is NOT called.
For other pieces of themed output, using hook.tpl.php files, the
preprocess functions ARE called.
Is there a reason why?
-Matt
More information about the development
mailing list