While reviewing the PHP code in the Joomla 2.5 Beez2 template, we come across the following code:

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

The code above defines a new position within a template, in this case position-0. If you want to add a new position to your template, you'll need to use code similar to the above.

What we're going to do now is add a new position to our template, and we will name it position-xyz.

Please note:
If you would like to add positions to your Joomla 2.5 template, please make sure that you already know how to view where the current modules positions are and you know how to edit your template. If you are not familiar with HTML / CSS, this may be a difficult task for you.

Adding a new position to a Joomla 2.5 template:

  1. Update your template's index.php file

    To add our new position, position-xyz, we'll add the following code to our template's index.php file.
    <div style='border:1px solid #000; padding:2px;'>
            <jdoc:include type="modules" name="position-xyz" />
  2. Update your template's templateDetails.xml file

    Your template's templateDetails.xml file includes a listing of all positions available within the template. After updating our index.php file, we now need to update our templateDetails.xml file. The code highlighted below shows the updates that we made:

  3. Test the changes!

    If the changes were made successfully, use the template previewer on your template. In our example, we added position-xyz at the very top of the template. You can see it was added successfully in the screenshot below:

Continued Education in Course 219: Joomla 2.5 Template Development Tutorial
You are viewing Section 12: How to add a new position to a Joomla 2.5 Template
Section 11: Joomla 2.5 Templates - $this->direction
Section 13: Joomla 2.5 Templates - $files = JHtml::_(stylesheet)
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

Support Center Login

Social Media Login

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

2 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!