I’m building a web site for my village and I decided to use a new CMS for some fun. The two apparently popular choices were Joomla and Drupal, both PHP based with similar funtionality on the surface. Between the two Joomla is regarded as the easier of the two so I decided to start with that. In hindsight this was a mistake: Joomla is only half a CMS, as I hope to explain.
As an aside, all the documentation I have read on Joomla is pretty poor at explaining how it all fits together so this post also acts a decent basic guide.
Content structure
Articles are the basic text of web pages and are displayed in the main body of the page. When you write one it can be either uncategorised or placed inside the content structure. The content structure is made up of sections at the top level and categories within the sections. Yes that’s right, Joomla imposes a two level content structure, no more and no less.
Sections and categories are used in various mechanisms to display content, in particular in menus. For example you can easily show a list of the section or categories or documents in a category. However they are not part of the navigation structure, that is entirely independent.
Site structure
The site structure is the hierarchy within the URLs for your site and in Joomla this is created entirely by your menus. Your location on the site is always within a specific menu path. When you move to another part of the site you always move menu path at the same time.
Breadcrumbs always show your current menu path. If you have friendly URLs configured then these are generated from the menu structure.
It is possible to simulate a menu system that is entirely independent of the site structure by creating a hidden set of menus for the site structure and using the visible menus as redirections into this hidden set of menus.
Interestingly URLs are generated entirely from menus. Each menu item has an alias and that is used for the URL segment created by that menu. You can’t assign an alias to an article that is used whenever that is displayed. This also means that if you have a menu item that displays a list of articles then the URLs for those cannot be search engine friendly. You simply have to use menus whenever you want a URL like that.
Templates
Templates define the look and feel of the site and you can find a wide variety of free ones out there. Switching between them is pretty easy.
Modules
Modules generate blocks of content. Each module is a specific instance of a type of module with individual parameters. The built-in types of module include breadcrumbs (called mod_breadcrumbs), banners (called mod_banners) and footer (called mod_footer). You can create any number of modules of the same type each with different parameters.
What appears where on the page
Each template has different areas for content on it called positions. For example the template ‘beez’ defines the following set of positions:
left
right
top
breadcrumb
user1
user2
user3
user4
debug
syndicate
These positions are defined for each template in the file templateDetails.xml. Within the Template Manager you can select Preview to see where the various positions are on a page.
Interestingly these positions do not include the central area of the page that the article displays in, they only define the areas around it. This is one of the “half a CMS” features of Joomla.
The Module Manager is used to put modules into different positions. You can assign more than one module to the same position and the order field is used to determine the order in which they appear. For example the position ‘left’ is often used for the left-hand column of a three-column layout and multiple menu modules are commonly assigned to this position. The first one appears at the top, then the second below it and so on.
For each module you can also select on what pages it appears. This is done within the Module Manager and is configured by selecting within which menu items this modules appears.
Suppose you want a number of modules to appear in the right hand column of a three-column layout on the front page but the rest of the pages not to have right-hand column then you configure the modules to only appear on the home page and none of the menus. They then effectively disappear when you leave the front page.
In some other CMS you can have one article replace itself by any other article and keep the same menu path, which would mean that a particular content item might appear in any menu path and theoretically different modules would be visible each time. However within Joomla one article cannot replace itself with another. Instead all one article can do is link to another by specifying the full URL including, by definition, the menu. This means that the modules that are visible for any article are always determined by where it appears in the menu structure.
If you wanted to have one article appear in two ways, with different modules appearing in each way then you need to have two different menu paths for the same article with the modules set to appear differently for each menu context.
Main body of the page
The main body of the page is different from the positions explained above. It is its own unique area. The way this main body of the page looks is determined by the menu item that is used to access it. Remember that even if you link from another page, it still goes via the menus so this always holds true.
Joomla uses the term ‘content layouts’ for the different ways the main body can be displayed. The built-in content layouts include:
- The article itself
- A blog style layout of the articles in a particular section or category. This normally displays one article at the top with two columns of articles below it.
- A blog archive of the articles in a particule section or category. This is the same as the blog style layout but includes drop downs to select articles from a specific date.
- A list style layout of the articles in a particular section or category. This is presented in tabular format with sortable columns.
Content layout can also be generated by components. So if you see a Joomla plugin that describes itself as a module only then it cannot generate content for the main body, it has to have component functionality also. The built-in components include:
- Search form
- Login form
- A wrapper around some external content. This is implemented using an iFrame.
To select any content layout you have to create a menu item and specify which type of content layout that menu item leads to. For example if you want to create a search form then you create a menu item (called ’search’ I guess) which is configured to generate a search form content layout. The oddity from this is if you want a link to the search form that is separate from a menu item then it has to link to a menu item path for the form, there is no other way to create the search form.
Conclusion
This poor control over the main body of the page and the weird way that menus are used for URLs are my main disappoinments with Joomla. Had I found a number of good third party components that provide real flexibility for content layouts with good URL support then I might have been pacified. As it is I switched to Drupal and found that light years better - but more on that later.