Custom offline pages for #joomla will be available for download soon..

by Revision Technology

(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 (5)Add Comment
0
Convert header into a normal module position.
written by Abraham, June 21, 2009
Thanks so much for the information here.
My problem is that i want to convert the header position of two websites into normal module positions, so I can implement something more dynamic like the simple image rotator.
I am very new to web programming, but i am getting along with the joomla stuff. If you could help me to go about this, i'd be much grateful.
Thanks in advance.
0
module positioning
written by samuel, June 22, 2009
hello,
thanks for da info given regarding module positioning.
basically i want to create a new position in the center of the page(content). the reason for it is to keep sermonspeaker, which consists of some audio sermons for the viewers to listen.i have installed sermonspeaker component and sermoncast module. but the problem is i am unable to position it in the center. can u help me out.

thanks
sam
Brian Duckett
@Abraham
written by Brian Duckett, June 22, 2009
Hi Abraham,

The Firefox browser has an add-on called Firebug, which can be downloaded from http://addons.mozilla.org - Install this plugin into your browser, click inspect, and click on the module position you'd like to edit. You'll be able to see the id or class for the header. Open up the index.php for your template and use the syntax in this article, for adding the module position. Add the new position to your template.xml. The style sheet shouldn't need any major changes.



Note: You may want to copy your site to a development directory to test your changes.

If you'd like for me to take care of it for you, please visit my help desk. http://www.revision-technology...pport.html
Brian Duckett
@Sam
written by Brian Duckett, June 22, 2009
Hi Sam,

The easiest way to get the module to display in the center of the page is to use the { loadposition myposition } without the spaces to the left and right of loadposition and myposition, in the main content area, where "myposition" is the actual module position name (e.g. user1) being used to hold that element. Also, ensure the plugin is active in your plugin manager.

I hope this helps.
~Brian
0
I want to change some module positions
written by metabern, November 16, 2009
I am experimenting with an artisteer generated template that has joomfish translation. I want to put the language selector on the same line as the top nav to the right of it. I need to reduce the width of user 3 so that it does not occupy the entire width of the site and then add or move a template position to where I want it to be. Any help would be much appreciated

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.