Actions

Difference between revisions of "Module Position"

From Joomla! Documentation

m (Tom Hutchison moved page Module positions to Module Position without leaving a redirect: name must match chunk name)
 
(26 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{inuse}}
+
<noinclude><languages /></noinclude>
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.
+
<translate>
 +
{{Chunk:Module Position/en}}
 +
__TOC__
 +
==Understanding Module Positions== <!--T:1-->
 +
Joomla! Users and Administrators need to only understand the following:
 +
*Modules are set positions dictated by the [[template]] developer when they developed the template.
 +
*Modules can be turned on and off based on menu selection.
 +
*Modules can be reordered in their assigned position using the Module Manager.
  
For example the module position "Left" could be used in the left side of the template to display a site navigation menu.
+
===Visualization=== <!--T:2-->
So if a module is assigned the "Left" position, it will be displayed wherever the designer puts that "Left" module position.
+
It's possible to visualize all modules set on a template by calling the <code>"tp=1"</code> query string on the front-end.
 +
<pre>
 +
http://www.example.com/index.php?tp=1
 +
</pre>
  
==Templatedetails.xml==
+
<!--T:3-->
The <code>templatedetails.xml</code> 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.
+
'''Joomla 2.5''' {{JVer|2.5}} and '''Joomla 3.x''' {{JVer|3.x}} will show the template positions with ?tp=1 or &tp=1 if the '''Preview Module Positions mode''' in the Template Manager has been '''Enabled''':
<source lang="html">
+
*{{rarr|Extensions,Template Manager}} then click the Options button in the toolbar.  
<positons>
+
*Under the '''Templates Tab''', make sure <u>''Preview Module Positions''</u> is set to '''Enabled'''.
<position>top</position>
+
<position>left</position>
+
<position>right</position>
+
<position>bottom</position>
+
<position>banner</position>
+
<position>syndicate</position>
+
<position>footer</position>
+
<position>user1</position>
+
<position>user2</position>
+
<position>user3</position>
+
<position>user4</position>
+
</positions>
+
</source>
+
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 <code><positions></code> and <code></positions></code> tags. In between those tags in the <code>templatedetails.xml</code> file, add the name of the module position in between a set of <code><position></code> and <code></position></code> tags.
+
  
==Use and Implementation==
+
==Module Map== <!--T:4-->
A Joomla! template displays a set of modules added to a specific position using the <code><jdoc:include /></code> statement shown below (for further information about <code><jdoc:include /></code> see [[jdoc statements]]):
+
The image below shows an example of a module map when module mapping is enabled in template administration.
<source lang="html">
+
:[[Image:Module_Map.jpg|600px|Module positions in a default Joomla! 1.5 template]]
<jdoc:include type="modules" name="name of module position" />
+
 
</source>
+
<!--T:5-->
 +
<noinclude>[[Category:Templates]]
 +
[[Category:Modules]]
 +
</noinclude>
 +
</translate>

Latest revision as of 22:57, 24 February 2014

Other languages: català 33% • ‎English 100% • ‎español 100% • ‎français 100% • ‎Bahasa Indonesia 100% • ‎日本語 100% • ‎Nederlands 100% • ‎Kiswahili 100%

A module position is a placeholder in a template. Placeholders identify one or several 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 defined to be on 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.


Contents

Understanding Module Positions

Joomla! Users and Administrators need to only understand the following:

  • Modules are set positions dictated by the template developer when they developed the template.
  • Modules can be turned on and off based on menu selection.
  • Modules can be reordered in their assigned position using the Module Manager.

Visualization

It's possible to visualize all modules set on a template by calling the "tp=1" query string on the front-end.

http://www.example.com/index.php?tp=1

Joomla 2.5 Joomla 2.5 and Joomla 3.x Joomla 3.x will show the template positions with ?tp=1 or &tp=1 if the Preview Module Positions mode in the Template Manager has been Enabled:

  • Extensions  Template Manager then click the Options button in the toolbar.
  • Under the Templates Tab, make sure Preview Module Positions is set to Enabled.

Module Map

The image below shows an example of a module map when module mapping is enabled in template administration.

Module positions in a default Joomla! 1.5 template