Atlanta Intown Web Design

Home arrow Blog arrow How to add a Joomla Template Module Position

How to add a Joomla Template Module Position

Tuesday, 08 September 2009

If you work with Joomla sites long enough you have the need to add a module position or two to get the functionality required. Adding a new module position can seem complicated but it is actually pretty simple.  Only two template files are modified in the process.

The more html and css you know the better the process will be. 

 

Understanding the Joomla Module code.

The module code:
<jdoc:include type="modules" name="YOURNEWMODULE" style="none" />

jdoc:include type= is the variable that calls elements of Joomla.
Learn more about jdoc statements: http://docs.joomla.org/Jdoc_statements#Module

name= is the name of your new module positions
Sekect a nane that seems appropriate or relates to the module positon

style=  refers to module chrome:
typically will be "none" or "xhtml"
Learn more about Joomla Chrome http://docs.joomla.org/What_is_module_chrome%3F

 

Steps to add a Joomla Template Module Position

1. Edit the template index.php file to add the new module code.
<jdoc:include type="modules" name="YOURNEWMODULE" style="none" />
It will help if you know some html and css.

2.Edit the templateDetails.xml file.
Look for the <positions> section of the file.  ensure that the name of the module matches the module postion you added to the index.php file in step 1

<positions>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>YOURNEWMODULE</position>
</positions>

3.Assign a module to your newly created module position.
Log into the Joomla backend for this step.
If you do not see your module position you may need to logout and into the Joomla backend.

 

Helpful Module and Template Tips

  • Want to see all module positions? add ?tp=1 or &tp=1 to the end of your front end URL
    Example: www.mydomain.com/?tp=1
  • I typically wrap the module inside of a <div> so that I can apply the apropriate css
  • Things not 100% clear check out your favorite templates and see how they added the code.  This is how I learned.
  • Want to add module position in the middle or your content area  Check our post on Modules Anywhere


Was this helpful do your need more detail on a particular step?
Leave a comment and let me know.

Comments (1)Add Comment
0
Very good place to start
written by joseph, December 26, 2009
Thank you for your instructions - this was a good place to start..

Write comment

busy
 
< Prev   Next >

Twitter Intown Web Design Blog Posts via RSS

You should follow me on Twitter here

Add the Intown Web Design Blog to your iGoogle Home Page

Add to Google