Joomla! allows us a good deal of freedom in creating modules. The first file that we must create is the module file itself. We will create a frontend module that will list those movies that have received five stars in their review. Our module will be titled "Critics Choice," so we will name our module file mod_criticschoice.php
. The file mod_critcschoice.php
will be the entry point for our module which will be invoked when the module is enabled and positioned on the site. There are no restrictions as to what we choose to do within this file. Unlike components, modules are generally designed to output limited amounts of data. Although modules can be designed to take user input via a form (for example, the mod_login
module), most modules simply retrieve and format data.
You can output data at any point during the execution of a module. One way for you to test this is to observe that if you output some data from mod_criticschoice.php
, the data will appear in the module.
We will begin...