All Joomla extensions have manifest files (manifest.xml or <extension_name>.xml). This file is located in the root directory of the installation package. It include general installation information and parameters for the extension.

  1. Root Element
  2. Metadata
  3. SQL: Install, Uninstall, Update
  4. Front-end Files
  5. Media Files
  6. Administration Section
  7. Menu Links and Submenus
  8. Configuration
  9. Script File
  10. Update Servers

Root Element

This starting and closing tags for all extensions are:

<extension></extension>

Attributes

  • type (type of extension - module, plugin, component, language, file, package)
  • version (Joomla version - 3.4)
  • method (install or upgrade)
  • group (applicable only for plugins)
<extension version="3.5" type="plugin" group="content" method="upgrade">

The group attribute is required for plugins because there are several types of plugins. The upgrade method is important. If you do not include this, then every time you install an upgrade version of the extension, the uninstall script will run and it will delete your existing data.

Metadata

The following elements can be used to insert metadata.

<name></name>
<author></author>
<creationDate></creationDate>
<copyright></copyright>
<license></license>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<version></version>
<description></description>

After adding root element and its attributes, add the metadata information. The version tag is important as each time you release a new version of your extension you should adjust this version number. You should use a three digit version number separated by full stops.  The description tag is the text that the user will see when they initially install the plugin.

Front-end Files

The third part of manifest is to include all files and folders to copy to the front-end directory. It is placed in the <files> element.

<files>
<folder>views</folder>
<filename>index.html</filename>
</files>

In the older Joomla! versions, you had to individually list every file in the extension, however, now you can use the folder tag to include all the files and subfolders within a folder.

Configuration

The <config> element describes the configuration options for the extension (except component type, which do not support this). These options can also be defined in a separate file named config.xml.

Each fieldset must contain one or more <field> elements.

Database SQL Files

Components generally have one or more database tables to store their data. When you install your component, you need to run some SQL command to create the table, so the <install> tag tells Joomla where this file is.

When someone uninstalls your component, you will need to run some clean up SQL commands that delete the tables used by your component and remove all traces. The <uninstall> SQL files allow you to do that.