1
Hi - just started looking at XOOPS recently and so far i've been very impressed by what i've seen. I've been trying to get my head around theme and module development and i think i understand the basics now.
I want to display a different image at a particular place in the page dependant on which module is currently active. Originally i thought i could do this just by playing with the template, but now as i'm beginning to get my head around smarty templates i'm thinking that's not enough. The currently active module name does not appear to be one of XOOPS default smarty variables (correct me if i'm wrong, but the list i saw definitely didn't include it).
The best idea i've come up with is to edit header.php so it exports another smarty variable with the module name. i'm thinking
xoopsTpl->assign('modname',$xoopsModule->getVar('dirname'));
should do that?
and then just use something like
<img src="/images/<{$modname}>/module_image.jpg">
at the appropriate place in my theme.
However, i really would prefer to avoid hacking any of the core XOOPS files if possible. Is there a smarter way to do this? Will my suggestion even work?
Thanks