Add class name to language switcher in Joomla administration
Class name added to container element
No class name added
Joomla_4.0.0-alpha7 (3 days ago)
Curiously seem to work with other modules ???
Title |
|
Thanks Infograf768
With your help, I find the problem
I put my switcher in a new added position
<?php if ($this->countModules('top-tools')) : ?> <div class="grid-child container-top-tools"> <jdoc:include type="modules" name="top-tools" style="none" /> </div> <?php endif; ?>
If I change the module “style” for “default” or “xhtml”, my module class is added
<?php if ($this->countModules('top-tools')) : ?> <div class="grid-child container-top-tools"> <jdoc:include type="modules" name="top-tools" style="xhtml" /> </div> <?php endif; ?>
style="none" />
• No custom added class work in the module administration if “none”
• Also, if “none”, no div moduletable is added
Is this normal ?
Is this normal ?
yes and it is the same in joomla3
In 3.x for me it is a bug.
$params->get('moduleclass_sfx')
is never fetched.
Therefore
<div class="mod-languages<?php echo $moduleclass_sfx; ?>">
gives nothing.
Trying now to find why.
See
It is by design and has been that way forever
The fact that it has been like that forever does not mean it is ok.
Let's rather find how to solve this as it happens also when choosing html5 as style.
I mean in 3.x
In fact, the problem comes from a confusion for $params in ModLanguagesHelper::getList($params);
There, $params
is not added to the module params but replaced by the plugin params.
Will make patch for 3.x as the change is simple.
Would it be B/C is to be decided.
EDIT: The helper has been modified in last staging and the issue is no more present there.
:)
Therefore I apologize:
Also, if “none”, no div moduletable is added
Is this normal ?
Yes it is. Closing as expected behavior.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-01-05 10:54:29 |
Closed_By | ⇒ | infograf768 |
Cool!
It is added to the container