I looked everywhere trying to figure out how to add a module position to a template override. The normal method of adding a module position is to use a jdoc statement. However, for some reason they do not work in template overrides (scope issue?). I finally found the solution at http://betweenbrain.com/including-joomla-module-positions-in-template-overrides and because i has such a difficult time finding it, I decided to repost the code here.

<?php
if(count(JModuleHelper::getModules('tags'))) { 
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer( 'modules' );
$options = array( 'style' => 'raw' );
echo $renderer->render( 'module_position', $options, null);
}?>

 To make this work, just change the "module_position" to the module position of your choice. The effect of the code should be the same as a jdoc statement.

MC900433145

 


Discuss this article
You need to log in or register to participate in this discussion.

Latest News

HM Tags The HM Tags module is a module for displaying Joomla's meta keywords as tags for individual articles...
Imagine I try to keep the melodramatic out of hypermodern.org. With this I will surely fail: [hmyt]http://w...
Science Denial Dangers Michael Specter talks about the dangers of science denial. He touches on subjects such as refusal to...
HM Tube I created the HM Tube Joomla plugin to play YouTube videos using the JW player, and its customizatio...
HM Tube (2) I created the HM Tube Joomla plugin to play YouTube videos using the JW player, and its customizatio...
JoomlaXTC News - Copyright Monev Software LLC