Adding a Module Position in a Joomla 1.5 Template

Adding a module position in a Joomla 1.5 template is not as easy as it was in the 1.0 templates. It is a two step process:

1. Add code to template PHP file.

For example, this would go in the index.php file in the template folder – or if you are adding it in an include file.

<?php if ($this->countModules('user6')) : ?>
    <div>
        <jdoc:include type="modules" name="user6" style="xhtml" />
    </div>
<?php endif; ?>

2. Add module name to templateDetails.xml

You then need to tell Joomla which module positions are available in this template. If you don’t do this step, then Joomla will not present the module position when giving you the option of where to place a module.

templateDetails.xml is in XML format. Within the <install> namespace, add this:

<positions>
      <position>user6</position>
</positions>

If you already have positions listed, just add the <position>user6</position> part along with the rest of them.

Share and Enjoy:
  • Twitter
  • del.icio.us
  • Digg
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Print
  • StumbleUpon

No Trackbacks

You can leave a trackback using this URL: http://systembash.com/content/adding-a-module-position-in-a-joomla-15-template/trackback/

One Comment

  1. Paul

    Thanks!! Easy-peezy.

    Posted November 24, 2008 at 5:39 pm | Permalink

Post a Comment

Your email is never shared. Required fields are marked *

*
*