How to load specific module positions within the JReviews theme files

From JReviews Documentation
Revision as of 15:10, 13 September 2017 by Jreviews (Talk | contribs) (Redirected page to Custom module positions in JReviews theme files)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Redirect page
Jump to: navigation, search

In the listing detail page theme file (detail.thtml), you can use standard Joomla Loadposition plugin to load modules assigned to the specified position (i.e. user1 in this case):

{loadposition user1}


In other theme files you will need to use this code:

<?php 
$position = 'user1';
$params		= array('style'=>'');
$document	= &JFactory::getDocument();
$renderer	= $document->loadRenderer('module');
$contents = '';
foreach (JModuleHelper::getModules($position) as $mod)  {	
	$contents .= $renderer->render($mod, $params);
}
echo $contents;
?>