All modules should include a manifest in the form of an XML document named the same as the module. The file holds key "metadata" about the module.

Note: All modules must be prefixed with mod_.

Directory Structure & Files

Manifests are stored in the same directory as the module file itself and must be named the same (the file extension being the obvious difference).



This XML file just lines out basic information about the template such as the owner, version, etc. for identification by the Joomla! installer and then provides optional parameters which may be set in the Module Manager and accessed from within the module's logic to fine tune its behavior. Additionally, this file tells the installer which files should be copied and installed.

A typical module manifest:

<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="1.5.0">
	<!-- Name of the Module -->
	<name>Hello World - Hello</name> 

	<!-- Name of the Author -->
	<author>Ambitionality Software LLC</author> 

	<!-- Version Date of the Module -->

	<!-- Copyright information -->
	<copyright>All rights reserved by Ambitionality Software LLC 2008.</copyright> 

	<!-- License Information -->
	<license>GPL 2.0</license> 

	<!-- Author's email address -->

	<!-- Author's website -->

	<!-- Module version number -->

	<!-- Description of what the module does -->
	<description>Outputs a random list of user names</description>

	<!-- Listing of all files that should be installed for the module to function -->
		<!-- The "module" attribute signifies that this is the main controller file -->
		<filename module="mod_listnames">mod_listnames.php</filename>
		<!-- Any language files included with the module -->
		<language tag="en-GB">en-GB.mod_listnames.ini</language>
	<!-- Optional parameters -->
		<fields name="params">
			<fieldsset name="basic">
				<!-- parameter to allow placement of a module class suffix for the module table / xhtml display -->
				<field name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="PARAMMODULECLASSSUFFIX" />

				<!-- just gives us a little room between the previous paramter and the next -->
				<field name="@spacer" type="spacer" default="" label="" description="" />

				<!-- A parameter that allows an administrator to modify the number of users that this module will display -->
				<field name="usercount" type="text" default="5" label="LABEL USER COUNT" description="DESC USER COUNT" />

Note: Notice that we DO NOT include a reference in the files section for the XML file.

Let's go through some of the most important tags:

The extension tag has several key attributes. The type must be "module".
You can name the module in any way you wish.
The files tag includes all of the files that will will be installed with the module.
Any number of parameters can be specified for a module.

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®