Is it possible to *optionally* override a theme in Drupal 6?

Posted by David Semeria on Stack Overflow See other posts from Stack Overflow or by David Semeria
Published on 2010-06-02T12:51:40Z Indexed on 2010/06/02 12:53 UTC
Read the original article Hit count: 129

Filed under:

I want to override the theming of only one (custom) menu. I can do this with phptemplate_menu_tree() but - of course - it overrides the rendering of all menus.

I've tried returning FALSE (an obvious technique IMO) if the menu is not the specific one I want to override - but this doesn't cause the overridden theme function to be called.

My only alternative (when the menu is anything other than the specific one) is to call the overridden function from within phptemplate_menu_tree() - but this seems to defeat the whole point of the override system, since the default rendering function will be hard-coded therein.

I hope the explanation is clear, and any help is greatly appreciated - tks.

© Stack Overflow or respective owner

Related posts about drupal