joomla-override icon indicating copy to clipboard operation
joomla-override copied to clipboard

Module chromes doesn't work when plg enabled

Open ahmedvila opened this issue 10 years ago • 1 comments

Joomla 3.2.3.

Module chromes defined in template (modules.php) no longer apply when plugin is enabled, specifically chrome for mod_menu. In the administrator site there is no changes, but in the site all chromes are reverted to "html5" chrome.

ahmedvila avatar Apr 28 '14 06:04 ahmedvila

I'm not using github, so please excuse for me posting in here. It seems that 3.2 introduced different handling of styles/chromes.

Anyway, by comparison of /libraries/cms/module/helper.php and /joomlaoverride/core/module/helper.php, I've found that you're missing these lines from renderModule() method: ... // Get the template $template = $app->getTemplate(); ... if ($paramsChromeStyle) { $attribs['style'] = preg_replace('/^(system|' . $template . ')-/i', '', $paramsChromeStyle); }

Once those lines are introduced, it correctly recognizes chrome set in the module configuration. Otherwise, it takes chromes set in template PHP file.

ahmedvila avatar Apr 28 '14 23:04 ahmedvila