Generating an Option Module Layout – Joomla! 2.five

Posted in WordPress on Jun 1, 2014

There are situations when the default structure of a Joomla! module does not match in a particular module place the way you want. To get all around this, you can create an Option Format for the module if it makes use of the MVC composition and has an Choice Structure alternative in the Module Manager. Commonly you will come across this choice less than Innovative Selections. The MVC construction will allow the net designer to override or generate an option structure of a module from the template devoid of hacking the core files. Incorporating the new layout to the template alternatively than the module will be certain the new format does not get overwritten throughout a module or Joomla! update.

The Joomla! default login module is a excellent illustration for this tutorial since it is a vertical module that can take up really a bit of room on the webpage. There are numerous module positions in a Joomla template where by this would not be ideal. For case in point you could want a login module in the header of your web page on just one line.

For this tutorial we will display you how to setup an Alternative Layout for the Joomla default login module. We will not get into the specifics of enhancing the certain file. This will be lined in a foreseeable future tutorial.

Open up the lively template folder: templates/your_template/html.
Produce the html folder if one does not exist.
Generate a new folder here: templates/your_template/html/mod_login.
For extra stability, incorporate an empty index.html file to each and every folder that is produced in buy to protect against unauthorized searching of this folder (Redommended).
Future open up the folder: modules/mod_login/tmpl.
Duplicate the file: default.php.
Paste the file into the folder we established in the template:templates/your_template/html/mod_login.
Rename the file to whatsoever you want but make it descriptive so you know the purpose of the new format. I will rename this file to horizontal.php mainly because we require a horizontal structure rather than the vertical structure utilised in default.php.
Open horizontal.php and edit accordingly.
Upload horizontal.php to templates/your_template/html/mod_login
Go to your Joomla Administrator and open the Module Supervisor.
Develop a new login module.
Open the Superior Alternatives Slider Tab.
Transform the value for Alternate Structure from Default to horizontal.

That is it! You just created an Substitute Format for the Login Module. You can repeat this system for several layouts.

By Christopher V Masters

Leave a Reply

Your email address will not be published. Required fields are marked *