Joomla Developer Manual

Manual Index

MVC Anatomy: File Structure

Component Zip File Structure

On installation the parts of the come_countrybase component are distributed to different locations in the Joomla file structure. Administrator files go into root/administrator/components/com_countrybase. Site files go into root/components/com_countrybase. Media files, javascript and css files (if any), go into root/media/com_countrybase. In some components language files may go into root/language/en-GB/com_countrybase.ini but the latest recommendation is to keep the language files in a subfolder of the component.

Just where the items go is controlled by the component manifest file, in this case countrybase.xml.

The component zip file structure is illustrated below as it appears in the Eclipse IDE:

com_countrybase File Structure

Note that the zip file contains everything inside the com_countrybase folder. You can make a zip just by compressing that folder. Outside that folder are build.xml, which is a file used to build the component whenever a change is made, and README.md, which is a standard Markdown file in Github format that describes the component.

Notes

  • There are more than 40 files in this simple component!
  • Files destined for the administrator, media and site locations are shown expanded.
  • On installation the countrybase.xml file is copied to administrator/components/com_countrybase where it is needed for update or uninstall purposes.

Related Tutorials

MVC Anatomy