1.5 Template Project

The Joomla! Documentation Working Group is running a project to develop detailed reference and tutorial material on Joomla! 1.5 templates.  There is a project page on the documentation wiki where you can see the work in progress and help us by contributing your knowledge.

Who's Online

We have 19 guests online

Help Site License

The Joomla! Help Site content is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution NonCommercial ShareAlike 2.5. Some parts of this website may be subject to other licenses.
Home arrow Developer Manual arrow 7. Packaging Custom Work arrow Module Setup File

PDF Print E-mail

Packaging Custom Work :: The Module Setup File 

{glossarbot=disable}The XML for a Module installation could look like this:

<?xml version="1.0" encoding="iso-8859-1"?>
 <mosinstall type="module" version="1.0">
   <name>A Sample Joomla! Module</name>
   <author>Joomla</author>
   <creationDate>15/09/2005</creationDate>
   <copyright>(C) 2005 Open Source Matters. All rights reserved.</copyright>
   <license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
   <authorEmail>admin@joomla.org</authorEmail>
   <authorUrl>help.joomla.org</authorUrl>
   <description>It displays a menu.</description>
   <version>1.1</version>
 
   <files>
     <filename module="mod_mainmenu">mod_mainmenu.php</filename>
   </files>
   <params>
    <param name="menutype" type="text" default="" label="Menu Type"
         description="The name of the menu (default mainmenu)" />
    <param name="class_sfx" type="text" default="" label="Class Suffix"
         description="A suffix to be applied to the CSS class" />
    <param name="menu_style" type="list" default="vert_indent" label="Menu Style"
         description="The menu style">
     <option value="vert_indent">Vertical</option>
     <option value="horiz_flat">Horizontal</option>
    </param>
   </params>
 </mosinstall>

There needs to be ONE and only one <filename> that has a "module" attribute.  This attribute is used as a system variable.

A Joomla! Module may optionally have parameters associated with it.  If parameters are supported by the Module then exactly one <params> element should be included containing one <param> sub-element for each parameter to be defined.  Once the Module is installed parameters will be displayed and values may be entered in the Administrator Module Edit form.  If no <params> element is defined (and if this is the case then no <param> elements must be included either) then a simple text box will be provided in the Administrator Module Edit form.

For Administrator Modules you must include a "client" attribute in the <mosinstall> element, for example:

<mosinstall type="module" client="administrator">

Please report any errors on this page to the Developer Documentation Forum.
Last Updated ( Monday, 24 April 2006 )
 
< Prev   Next >