I have a Problem with the carousel module from bootstrapjoomla.com Unfortunately the module doesn't support alternative layouts. But I need to have two carousel on my homepage. Therefore I've to create an override for the carousel where I change the carousel-id.
I tried to create an html-override depending on the moduleclass suffix but it doesn't work. The moduleclass suffix of my second carousel is " Carousel-carousel2". The code I inserted in the default.php in the override:
<?php
defined('_JEXEC') or die;
/* Layout anhand einer CSS-Klasse im Modul umleiten */
if(preg_match('/\Carousel-([A-Za-z]+)/', $module->moduleclass_sfx , $matches)){
if(!empty($matches[1])){
$this->setLayout($matches[1]);#ist Layout carousel2
echo $this->loadTemplate('default'); #carousel2_default.php wird aufgerufen
}
}else{
...
} ?>
carousel2_default.php is the file with my override.
My problem is, that the second carousel doesn't use the override but uses the default.php.