Module Override

  • PDF

Module Override

Modules typically have a directory structure that includes a template or tmpl directory.  This directory contains all the files that control the module's display.

Let's assume we have a module with this files structure:

/modules
/mod_latest_news
/tmpl
default.php (the layout)
helper.php (a helper file containing data logic)
mod_latest_news.php (the main module file)
mod_latest_news.xml (the installation XML file)

We would like to override the output of this module.  Assuming we are using the beez template, we can edit the default.php file and place it in the following directory structure.  (You will have to create a directory that corresponds to your module name.)

/templates
/beez
/html
/mod_latest_news (this directory matches the module directory name)
default.php (this file matches the layout file name)

By saving as a part of the template files you do not have to remember to edit files when you update versions of Joomla.  You can also maintain the module override when you distribute the template files.  (Don't forget to update templateDetails.xml when you add this file.)

In class override the mod_newflash module in the template of your choice.

  • Create a custom module for mod_flashnews remove all the tables - replace with divs.