Module Positions And Modules Within Joomla
Within the Content Management System Joomla you can view all of the module positions that are provided with your installed front-end template. By default this option is disabled within Joomla 2.5. Within this article we will show you how to turn this setting on and off along with viewing the positions in the front-end of your website.
Module Positions And Modules Within Joomla - Step One
First we need to log in to the 'administrator' section of our Joomla powered website. We do this by going to 'http://www.my-website.com/administrator/' and entering our 'Username' and 'Password'. Once logged in we will then go to 'Extensions -> Template Manage' and click the 'Options' button in the top right corner of our monitor.
When you click on the 'Options' button a 'light-box pop-up' will appear with two tabs and a number of settings. We will concentrate on the 'Templates' tab which is the default view once you click on the 'Options' button.
The option that we need to change is the 'Preview Module Positions', by default this setting is set to 'Disabled', what we need to do is 'flick the switch' and set it to 'Enabled'. Once you have changed the setting we will then click the 'Save & Close' button in the top right of the pop-up.
Module Positions And Modules Within Joomla - Step Two
We then need to visit the front-end of our website, for us we will browse to http://joomlahowto.webdevelopmentconsultancy.com/. As you will see nothing has changed and we can't see the templates positions. In order for us to see the positions we need to add '?tp=1' to the end of our URL as follows: http://joomlahowto.webdevelopmentconsultancy.com/?tp=1.
As you can see all of the templates module positions are now displayed. With this information we are able to set the 'Position' value of our modules that we want within our website.
For the second part of this Joomla How To Guide we will Create a new 'Menu' module and have it displayed within the menu area of our template. Our template of choice doesn't display the module position for the menu area but because we have a 'similar' template on this website, we know that the position is 'menu'.
By default Joomla 'ships' with a menu module published to 'position-7', you can either edit that module or un-publish it - for our example we will un-publish that module and create a new menu module.
Module Positions And Modules Within Joomla - Step Three
Now that the current menu module has been un-published we now need to create a new menu module that will display our menu within the front=end of our website. To do this we need to click the 'New' button located in the 'Module Manager' toolbar. When we click on the 'New' button a 'pop-up' will appear with a list of module 'types'. Because we are creating a menu module we need to select the 'Menu' link.
Once we have selected the 'Menu' link we will be taken to the main module view. Here we can give the module a 'Title', 'Position', 'Menu/Module Class Suffix' and set other basic and advanced settings. For now we are only interested with the following values:
- Select Menu
For the purpose of this example we will use the following values for our 'Menu' module:
- Title: 'Top Menu Module'
- Position: 'menu'
- Select Menu: 'Main Menu'
Once we have entered the details above we will then click the 'Save' button. We click the 'Save' button just in case we need to change any of the modules parameters. If we are happy with the current module settings we can then click the 'Cancel' button (providing we haven't changed any of the parameters in the mean time).
We can now visit the front-end of our website the see the 'Menu' module in place within the templates 'top bar'. At the moment we only have the 'Home' menu item, in our next article we will create a new article and add a new 'menu item' for the article.