1

I am building a Joomla 3 template that uses Bootstrap 3.

When publishing a Custom HTML Module I realized that using the “Bootstrap Size” of 3 will render

<div class="moduletable  span3">

This is ok, but useless on Bootstrap 3.

If I use the “Module Class Suffix” and set it to: col-md-4 instead, it will render:

<div class="moduletable col-md-4">

Which is great but it also would render this:

<div class="custom col-md-4">

On the module inner content producing effect not desired.

I tried to create a Module Chrome for it but $module->content; is already having the class.

Any idea how to solve this please?

Thanks

2 Answers 2

2

You can also define a new module chrome, or alter the existing with an override of the default module output:

templates/YOUR_TEMPLATE/html/modules.php

This will affect the rendering of all modules that use that chrome (which is defined in index.php with each module position). However, you will find that you might still need to override certain modules because they render out the module class more than once, as you have already discovered.

I created overrides for both modules.php and com_custom for my Oneweb Joomla template which you may find useful. You can find the files here:

https://github.com/nternetinspired/OneWeb/tree/master/html

1
  • Thanks, I overwrited mod_custon, only with <div class="custom"> <?php echo $module->content;?> </div> tanks both of you for helping Jan 25, 2015 at 8:04
3

You can overwrite mod_custom like every module. This feature is new since 3.x. Just copy:

modules/mod_custom/tmpl/default.php

to

templates/YOUR_TEMPLATE/html/mod_custom/default.php

and edit it.

Hint: You can also name it as alternative layout (e.g. default2.php) and select the alternative layout in module parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.