Difference between revisions of "Module Position"

From Joomla! Documentation

m (Added categorisation.)
Line 29: Line 29:
<jdoc:include type="modules" name="name of module position" style="xhtml" />
<jdoc:include type="modules" name="name of module position" style="xhtml" />

Revision as of 11:31, 17 July 2009

Module positions are placeholders in a template. They identify positions within the template and tell the Joomla! application where to place output from modules assigned to a particular position. The template designer has complete control over module positions, creating variations between templates and the respective Joomla! default positions assigned to modules in the installation sample data.

For example the module position "Left" could be used in the left side of the template to display a site navigation menu. So if a module is assigned the "Left" position, it will be displayed wherever the designer puts that "Left" module position - not necessarily the left side of the page.


The templateDetails.xml file contains all the installation and core information for a template, including the module positions it utilizes and displays. Here is a brief list of the commonly used names for the various module positions.


Although these are commonly used, it is up to the template developer to choose both a module position name and an accompanying display style. The addition of module positions, as displayed above, is implemented in between the <positions> and </positions> tags. In between those tags in the templateDetails.xml file, add the name of the module position in between a set of <position> and </position> tags.

Use and Implementation

A Joomla! template displays a set of modules added to a specific position using the <jdoc:include /> statement shown below (for further information about <jdoc:include /> see jdoc statements):

<jdoc:include type="modules" name="name of module position" style="xhtml" />