I need some direction on how to control joomla module visibility on VM pages (e.g. product, category etc..) programmatically. In other words, with template code only, no 3rd party extensions.
Thanks
You could place something like this in your product or category layouts.
EDIT: this was used in older Joomla versions, it still works.
$doc = JFactory::getDocument();
$renderer = $doc->loadRenderer('modules');
$position = 'vm-product-bottom';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);
The newer J3 uses:
$modules = JModuleHelper::getModules("vm-product-bottom");
$doc = JFactory::getDocument();
$attribs = array();
$attribs['style'] = 'raw';
foreach ($modules as $mod) {
echo JModuleHelper::renderModule($mod, $attribs);
}
Add the echo in the place you want the module to appear.
Stefan
are you wanting to setup specific modules for single categories? etc?
http://forum.virtuemart.net/index.php?topic=142979.msg505072#msg505072