Page 1 of 1

how to add new module position to template

Posted: Mon Oct 31, 2011 7:22 am
by danielyou
I have learned from Google that how to add new module position to template, as following:
Step one,open index.php file:

Code: Select all

<jdoc:include type="modules" name="yournewposition"  />
Another step one,

Code: Select all

<?php if($this->countModules('your-position-name')) : ?>
  <jdoc:include type="modules" name="your-position-name" style="none" />
<?php endif; ?>
Step two, open templatedetails.xml :

Code: Select all

<position>your-position-name</position>
For example, I want to add a new position for btslideshow module. The position will be between position "left" and "right".Then how to write code insert index.php file? I also learn that if you want to place new position after position "left", then you need to add code behind code of "left" in index.php, is that right?

Re: how to add new module position to template

Posted: Mon Oct 31, 2011 11:22 am
by imanickam
What you have learned is correct. It could be reinforced by reviewing the document http://docs.joomla.org/How_do_you_add_a ... osition%3F.

In addition to these syntax, what is important is to position the module. This could be done by a combination of the definition of divs in the file index.php and the positioning of divs in the css file(s). In fact, this has been illustrated a bit in the section 1.5 of the document referenced earlier.

Re: how to add new module position to template

Posted: Tue Nov 01, 2011 8:17 am
by danielyou
it works now, thank you imanickam.