InMotion Hosting Support Center

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)

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!

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

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

n/a Points
2014-09-05 8:25 am
ThanX my dear friend

im in iran

peace & love
n/a Points
2014-08-20 4:40 pm
thanx alot!
that was great!
but how can i place that position every where that i want?!
for example the right- bottom , left-middle , etc..

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:
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!