23 Jun 2015

Module position anywhere

The following snippet will create a module position. Place this inside any file, including view files. Replace the text my-new-position with the name of your new module position.

<?php
$myblurb_modules = &JModuleHelper::getModules( 'my-new-position' );
foreach ($myblurb_modules as $myblurb) {
$_options = array( 'style' => 'xhtml' );
echo JModuleHelper::renderModule( $myblurb, $_options );
}
?>