how to add new module position to template

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
danielyou
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Oct 30, 2009 8:50 am

how to add new module position to template

Postby danielyou » Mon Oct 31, 2011 7:22 am

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?
You do not have the required permissions to view the files attached to this post.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 24776
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: how to add new module position to template

Postby imanickam » Mon Oct 31, 2011 11:22 am

What you have learned is correct. It could be reinforced by reviewing the document http://docs.joomla.org/How_do_you_add_a_new_module_position%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.
- Ilagnayeru (MIG) Manickam
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged

danielyou
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Oct 30, 2009 8:50 am

Re: how to add new module position to template

Postby danielyou » Tue Nov 01, 2011 8:17 am

it works now, thank you imanickam.


Return to “General Questions/New to Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 5 guests