Actions

Difference between revisions of "Declaring module positions"

From Joomla! Documentation

(Declaring module positions)
m (Removed heading. Headings should be in the calling page, not in the called page.)
Line 1: Line 1:
===Declaring module positions===
 
 
 
In order for Module positions to be available for selection in the Module Manager they must be declared in the templateDetails.xml file for your template.  The <positions> element in this file contains sub-elements for each Module position that is supported by the template.
 
In order for Module positions to be available for selection in the Module Manager they must be declared in the templateDetails.xml file for your template.  The <positions> element in this file contains sub-elements for each Module position that is supported by the template.
  
Line 21: Line 19:
 
Further information on placement of the module position in the template file can be found in [[Module positions#Use and Implementation | Use and Implementation]].
 
Further information on placement of the module position in the template file can be found in [[Module positions#Use and Implementation | Use and Implementation]].
  
<noinclude>[[Category:Beginners]]</noinclude>
+
<noinclude>[[Category:Beginners]][[Category:Modules]][[Category:Templates]][[Category:Topics]]</noinclude>
<noinclude>[[Category:Modules]]</noinclude>
+
<noinclude>[[Category:Templates]]</noinclude>
+
<noinclude>[[Category:Topics]]</noinclude>
+

Revision as of 15:13, 25 February 2010

In order for Module positions to be available for selection in the Module Manager they must be declared in the templateDetails.xml file for your template. The <positions> element in this file contains sub-elements for each Module position that is supported by the template.

For example, here is a typical <positions> element in the templateDetails.xml file for a typical template.

<positions>
        <position>left</position>
        <position>right</position>
        <position>top</position>
        <position>user1</position>
        <position>user2</position>
        <position>user3</position>
        <position>user4</position>
</positions>

You can add and define new Module positions and give them any name you like, but it is recommended that you support at least those shown in the example above. This is so that some level of consistency is maintained when switching Templates or using multiple Templates on a single site.

Further information on placement of the module position in the template file can be found in Use and Implementation.