Hot answers tagged

1

I did manage to solve it in the end, although I still have no idea why the inline code - which was added by Firefox, not me - was added. I compared the html/css class code for the menu with another menu that wasn't doing the same thing. This code was faulty: <nav id="topmenu"> <?php if ($this->countModules('mainmenu')) : ?> <...


1

Usually i get around these kind of problems with a small custom PHP function. You can include it in you template index.php function thereAreModules ($position) { $modules = JModuleHelper::getModules($position); $ret = false; if (count($modules) > 0) { $ret = true; } return $ret; } Usage: if (thereAreModules('module-position-name-here')) {...


1

Your module is always published. It counts even if it has no content. A feature to exclude empty modules when counting modules in template may get included in 4.0.


Only top voted, non community-wiki answers of a minimum length are eligible