Creating a package for your extensions
In Joomla!, extensions are distributed in the form of packages. These packages consist of a compressed file (usually in the .zip
format), which holds all the extension files, and a manifest file, which contains instructions for Joomla! on how to place the files inside Joomla!.
In Chapter 2, we created our first package for the com_spm
component. To create this .zip
file, we just compressed the contents of the src/component
folder. That worked because we had the manifest file (src/component/spm.xml
) placed in the main folder of the ZIP package. Let’s look at the different parts of our manifest file. Open the /src/component/spm.xml
file; you will see the following lines at the beginning and the end of the file:
<? xml version="1.0" encoding="utf-8" ?> <extension type="component" method="upgrade"> ... </extension>
In these lines, we declare the XML standard we are using and...