(1 vote, average 5.00 out of 5)

Joomla Positions

Well written templates will include several module positions. These positions are set by the template designer via a combination of three files and file types. They are templatedetails.xml, index.php, and usually template.css. The following is an overview of each:

TemplateDetails.xml

This file is located in your templates folder. It defines and makes available to Joomla! a new module position in the template. For example, if you're creating a new banner module and would like the module to display in the banner position you would choose banner in the module parameters.

This banner module will display in the space created by your template designer. (Note: the specific space will vary depending on the template you choose or have created.) If you'd like to change where and how the banner module displays you'll need to find and edit the other two files, index.php and template.css.

There will be cases where you'd like to add a Joomla position to your template. This can be easily accomplished by opening your templatedetails.xml file and adding the new position between the positions tags.

<positions>
<position>myNewPosition</position>
</positions>

Index.php

When changing or adding a Joomla position, you'll need to visit the index file. For example if your banner position resides below the content component, and you'd like for it to display above the content, you'd move the call for the banner position above the content area. Module calls use this syntax:

<jdoc:include type="modules" name="mynewposition" style="xhtml" />
In cases of adding a Joomla position, place this line of code in your index and replace the mynewposition with the name of your position.

Template.css

The last piece of the puzzle is adding the position to the style sheet. Here you'll want to be as specific as possible. For example if your module lives inside of a div, you may want to place an id on it instead of a class. When utilizing the technique mentioned earlier to change a module in the index, keep in mind that minor edits will most likely be needed here also.

How do I find my template's positions?

The easiest way to locate the Joomla positions for your template is simply to place ?tp=1 at the end of your url. For example if test.com was running Joomla! I'd place test.com/?tp=1 in the browser and press enter to view my template's positions.

In conclusion, if you are in your administrator, you can view your Joomla positions by navigating to Extensions >> Template Manager >> Choose your template, and simply press preview. A frame will open with your web site's template where you can view the Joomla positions.

Subscribe
Trackback(0)
Comments (0)Add Comment

Write comment

busy

Joomla!Our Joomla! Tutorials are delivered to your mailbox once a week and provide a helpful procedure list for different tasks required to manage your site.

*indicates required

Did you know we also offer internet marketing services & training ?

 

General support for your website starting at only $100!

 

 
 
 
About

Revision Technology is a team of professional website consultants, developers and designers researching and building solutions that allow our clients to realize their ideas.

www.revision-technology.com
Contact

General inquiries: helpdesk@revision-technology.com
Support: Visit the FAQs

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
Updates

Our newsletter is excellent. Subscribe and get the latest updates.