How to add new module positions in joomla 1.5 template

by Nabeel on October 25, 2009

joomla If you are developing a new joomla 1.5 template or are editing any pre existing one, and need to add a new custom module position of your choice some where in the template index.php, here it is how to do it (you will be able to select this new module position from the Joomla! 1.5 admin backend for modules to be published at this new position):

1. Goto <joomla root>/templates/<template name>/ folder

2. Open the file index.php in that folder in your favourite editor

3. Add this code in the relative position in html of the template index.php to add the new custom module position in your Joomla 1.5 template

<?php if ($this->countModules('custom')) : ?>
<div>
<jdoc:include type="modules" name="custom" style="xhtml" />
</div>
<?php endif; ?>

4. Rename the word custom coming twice in the above code with any name that you want to give to that new module position.

5. Open templateDetails.xml in the same folder and find the part of code where it says <position>

6. After the already existing positions, simply add the new position that you just created in the above step in your Joomla! 1.5 index.php in the same format as the already existing ones.

<position>custom</position>

7. Replace the word custom with the name of the position that you defined in step 4 above while adding the new module position code for Joomla! 1.5 in template index.php file.

This will add a new custom module position in your Joomla! 1.5 template which you can use to publish modules at this new position. You can repeat the same procedure for more custom module positions for Joomla! 1.5 template.


Incoming search terms for the article:

Add new module position in a Joomla 1 5 template, what folder is positions in joomla, new position template, module positions joomla 1 5, joomla rename module position, joomla positionS ARE ALL WRONG, joomla position module in the same line, joomla module relative position, joomla module position coding, joomla how do i create custom position?, How to create a new Module Position in joomla 1 5 template, how to add compete com code to joomla, custom template error position joomla, create custom module positions in joomla 1 5, create custom div joomla plugin

You may also like

Leave a Comment

Please wrap all source codes with [code][/code] tags.

 

Previous post:

Next post: