Tips and Tricks to enhance Joomla! security and powerful

How to add a module position in a Joomla 2.5 template

User Rating: Rating StarRating StarRating StarRating StarRating Star Blank / 9
PoorBest 

By default, the Joomla! template available module positions. However, in some cases you want to add some other module positions. In this tutorial we will create a module position located just below the main text of the site.

Check the website template that you are using

First, you should check the website template that you are using. This can be found in the Joomla 2.5 Administrator -> Extensions -> Template Manager. This template is marked by a yellow star.

Adding a module position

Open templates/Your_Template_Name/index.php

(Replace Your_Template_Name with the actual name of your Joomla 2.5 template)

Find:

<jdoc:include type="component" />

 

Replace width:

<jdoc:include type="component" />
<jdoc:include type="modules" name="position-16" />
 

(You can replace position-16 with any name you want)

Save the changes.

Define new module position

Open templates/Your_Template_Name/templateDetails.xml

(Replace Your_Template_Name with the actual name of your Joomla 2.5 template)

Find:

</positions>


Replace width:

<position>position-16</position>
</positions>
 

(Replace position-16 with the name that was created in the index.php file) 

Save the changes.

Template language pack

If your template supports language packs, you can add to comment for this position as follows:

TPL_YOUR_TEMPLATE_POSITION_POSITION-16="Bottom Content"

Now, you can go to the Joomla 2.5 Administrator and change the position of a chosen module to the new position.

You can apply this tutorial to add another module position.