Modules are small programs that can be inserted anywhere in a site that uses Joomla.
Depending on the template (the part that handles the entire display) can be placed anywhere dynamically configuring it on the backend.
The function of the modules is basically display information in a small box, for example, could be used to show user data, date and time, temperature of a place in particular, etc. You can also use a module to link it to component and use it as a submenu.
Needed Files
You need 2 files to create a module: One is the XML file that is used for installing and configuring the module in Joomla. The other is the PHP file itself, which perform the task of displaying data on the site. Is necessary to respect the nomenclature putting “mod_” to the name of the module. This is important in order to install it on the Joomla´s backend.
Hola MundoJuan11/12/2008(C) 2008 Serfe. All rights reserved.https://www.gnu.org/copyleft/gpl.html GNU/GPL info@serfe.comhttps://www.serfe.com0.0.1Este modulo pretende explicar el funcionamiento de los módulos en Joomla.mod_hmundo.php
In this file we are going to put all the information about the module: the author, date and characteristics of the module. There are 2 important tags:
File Tag: we need to identify the files included in this module. In our example we only have a single file called mod_hworld.php.
Params Tag: are set the module parameters that can be changed from the administration. In this case we will test 3 parameters to learn how to use them.
This is our module. As you can see it is as simple as that. We have a line that prints the traditional “Hello World” and then a text indicating that the parameter is set in the administration.
Finaly, we compress and install:
Once we have these 2 files, we compresses it into one .zip or .tar, we go to our Joomla administrator and install it like any module. If the xml is correct, this will add the module to the database and will be availible in the module section to be used.
Serfeinfo(at)serfe.comhttps://www.serfe.com/images/serfe_logo_text.pnghttps://www.serfe.com/images/serfe_logo_text.pngFALUCHO 2032, S3016LDB, SANTO TOME, SANTA FE, ARGENTINA1-305-5375397
Share your project details We will get back to you shortly