Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module chromes doesn't work when plg enabled #15

Open
ahmedvila opened this issue Apr 28, 2014 · 1 comment
Open

Module chromes doesn't work when plg enabled #15

ahmedvila opened this issue Apr 28, 2014 · 1 comment

Comments

@ahmedvila
Copy link

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant