Last active
October 7, 2015 06:47
-
-
Save 2dpi/3121769 to your computer and use it in GitHub Desktop.
JOOMLA: load module position
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(count(JModuleHelper::getModules('module_position_here'))) :?> | |
<!-- only show if modules assigned --> | |
<?php | |
// define module position | |
jimport( 'joomla.application.module.helper' ); | |
$modules = &JModuleHelper::getModules( 'module_position_here' ); | |
foreach ($modules as $module) { //loop through the array and render their output | |
$_options = array( 'style' => 'raw' ); | |
echo JModuleHelper::renderModule( $module,$_options ); | |
} | |
?> | |
<?php endif; ?> | |
// OR USE NO-NUMBER MODULES ANYWHERE PLUGIN - e.g. {modulepos xxx|style} | |
// OR USE CORE PLUGIN - e.g. {loadposition xxx} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment