Define an custom module, with suffixe class
see documentation here
Suffix class append to custom module
No suffix class
Current version 4.2.6
(and Master branch)
Solution :
Edit modules/mod_custom/tmps/default.php
replace L29
<div id="<?php echo $modId; ?>" class="mod-custom custom">
<?php echo $module->content; ?>
</div>
by
<div id="<?php echo $modId; ?>" class="mod-custom custom<?php echo $params->get('moduleclass_sfx'); ?>">
<?php echo $module->content; ?>
</div>
Labels |
Added:
No Code Attached Yet
|
This is not a bug and it is the intended behaviour that you will see in all modules.
The module class sfx is added by the module chrome
joomla-cms/layouts/chromes/html5.php
Line 26 in 22184cb
The module chrome is defined for the module position in the template - in this case the chrome is card
joomla-cms/templates/cassiopeia/index.php
Line 221 in 22184cb
The chrome defined in the template can also be overridden at the module level here
In some templates you will see a module with a style=none
That means its using the chrome none.php and this one does not have the code wrapping the module output with the module class sfx
joomla-cms/layouts/chromes/none.php
Line 13 in 22184cb
In addition it should be mentioned that the class is not a suffix anymore. It is not appended as a suffix but as a class, with a space, as you can see by the code mentioned in the previous comment. In the UI the field has been renamed, but the parameter name moduleclass_sfx
has not been renamed for b/c reasons so that name might be a bit misleading when reading code.
Status | New | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-12-29 15:04:05 |
Closed_By | ⇒ | richard67 |
Closing as expected behaviour for the reasons mentioned in previous comments. Feel free to reopen if you think this is wrong.
Thks for the info
Is this issue only limited to the custom module? I suspect this is also the case for other modules.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39520.