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" />
    </div>
  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:

    <positions>
        <position>debug</position>
        <position>position-0</position>
        <position>position-1</position>
        <position>position-2</position>
        <position>position-3</position>
        <position>position-4</position>
        <position>position-5</position>
        <position>position-6</position>
        <position>position-7</position>
        <position>position-8</position>
        <position>position-9</position>
        <position>position-10</position>
        <position>position-11</position>
        <position>position-12</position>
        <position>position-13</position>
        <position>position-14</position>
        <position>position-xyz</position>
    </positions>
    
  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:
    position-xyz

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
Name

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

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

Need more Help?

Search

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!