I am using the Beez template that comes with Joomla! 3.6, and I am including a custom module (mod_custom) in a position of said template.
When I go to look at the template code to modify the layout it uses, all I find is:
<jdoc:include type="modules" name="position-9" style="beezDivision" headerlevel="3" />
position-9
It is the position where I am placing the module, but I want to modify the code that is added to the information that I enter, I explain it below:
<div class="moduletablemimodulo">
<h3>prueba</h3>
<div class="custommimodulo" >
Lemon drops gummies biscuit. Cotton candy pie toffee bear claw pudding marzipan chocolate cake fruitcake.
</div>
</div>
From the code above, I add through the Joomla! the title test , a class mymodule , and the text after the <h3>
.
What I want is that instead of that code, something like this appears:
<div class="mimodulo">
<h4>prueba</h4>
<span class="contenido">
Lemon drops gummies biscuit. Cotton candy pie toffee bear claw pudding marzipan chocolate cake fruitcake.
</span>
</div>
I have not found where I can modify it in the backend of Joomla!.
To be able to change the module tags you have to make changes in two parts (code wise), which should normally be done in a new template, to avoid overwriting Beez with Joomla! updates:
Modify the chrome of the module:
According to the documentation of Joomla!
In this case, the chrome of your module is beezDivision , and its respective code can be found in templates/beez3/html/modules.php:
Here you can create another function in the same file or modify beezDivision (not recommended):
The only two changes I made here were removing the class prefix
moduletable
and changing the default header level to h4, although this can be selected in your module's advanced settings in the backend.Override the mod_custom module template:
You can do this in the Joomla! backend, by editing the styles of your template, in the "Modifications" tab, selecting "mod_custom".
The code that you will find in templates/beez3/html/mod_custom/default.php is the following:
To get what you want, you should modify it to something like this:
You can see a little more information in the documentation of Joomla! .