Pregunta

I want to be able to assign multiple modules in a particular position but display only two of them at any given time in joomla. How do I be do that ?

¿Fue útil?

Solución

After some research I found out that one can use the below code to do it.

$arrayofmoduleObj = JModuleHelper::getModules('position') // to get an array of module Object.
$options    = array('style' => 'chrome');
foreach($arrayofmoduleObj as $moduleObject){
    /* code to decide whether to print this module or not if yes    */
    echo JModuleHelper::renderModule($moduleObject,$options) //to render a module Object..
   else continue;
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top