Hosted byThanks toPermalinksThe Art of Joomla: tutorials for Joomla developers, site implementers and artisans. Artisan: a skilled worker who practices some trade or handicraft. Written and maintained by Andrew Eddie - Joomla master developer. Following on twitter? Facebook new! |
Issue 1the Art of Joomla - Under the HoodHow Joomla! 1.5 Files are Organised
Written by
Andrew Eddie
Labels: Files and Folders
Joomla! 1.5 has many similarities to Joomla! 1.0 in terms of file structure and also many differences. In this article we will go over some of the major differences at a fairly high level.
/administrator /cache /components /images /includes /installation /language /libraries /logs /media /modules /plugins /templates /tmp /xmlrpc There are a few things to note here:
There are two other main changes we want to cover that have the biggest impact on developers and designers.
/com_content
/helpers
/models
/views
/article
/tmpl
There are quite a few files in their as well but we'll go over them another time. The important thing at the moment is to understand the relationship of the directories to the Joomla! menu system and also the templating system. There might also be a /controllers/ directory depending on the complexity of the component (and the personal preference of the developer - see the sidebar for more notes on the MVC terminology). Each directory under the /views/ directory is generally able to be called from the URL. For example index.php?option=com_content&view=article&id=1
/html
/com_content
/article
/mod_login
Both components and modules can have layout overrides. In the case of components you make a directory tree starting with the component name (the same as what is found under the /components/ directory), the the name of the view directory,and finally you include a php file with the same name as the layout file you want to override. Modules are the same except they don't have views, just the layout override (some third party developers do allow for different layouts in modules which is a pretty cool feature). All you need to remember is to match the component or module name, matched the view name for components, then match the file name of the layout. It's pretty simple really. We'll go into more detail another time about exactly how views and layout tick. |
|






When you unpack Joomla! the initial directories look like this:
One of the most interesting directories to drill into is the /library/ directory. You will see many familiar names of third-party scripts such as /phpgacl/, /phpmailer/, /geshi/ and others. You will also see a some new ones like /simplepie/ and an interesting directory called /joomla/.
The first major change is the restructure of the frontend components into an MVC format. The directory structure is generally something like this:
To see an example of this have a look in the Beez template. You will see a new directory called /html/.