Joomla 1.6 will include some important new changes in the Template Manager. This article gives you a preview of what you can likely expect in the final product.
New Template Styles
In Joomla you have always been able to assign a template to a particular menu page. This is done through the Template Manager. In Joomla 1.5 we added the ability to save template parameters which opened up a world of flexibility for users and designers. The following screenshot shows the template edit page as it is in Joomla 1.5.
In Joomla 1.6 we have combined these two features and created the concept of "Template Styles" and this is now the default landing list in the Temlpate Manager. The following screenshot shows the new page.
This template style list is also where you set the default template for both the frontend site and the backend administrator. The list is combined and you can filter on just one location if you want.
A template style is like a saved set of template options and you can create as many of these styles as you want for the same template. A simple example is a template with one option, that being for the base colour. The template might have the option to display in a red, blue or green theme. With template styles, you can create three styles, one each of the supported colours. The following screenshot shows the page where you can edit the style giving it a name and setting the template options (template parameters in Joomla 1.5).
We realise that it may take quite a bit of time to set up styles, so in the list view we’ve provided a "clone" function that duplicates an existing style. This allows you to change just those one or two options (out of the 20 you’ve already set) quickly and easily.
Now, here is the major change. You do not assign a template to a number of menu pages anymore. Rather, in the menu link edit screen, there is a new field that allows you to select which style you want to use for that particular page. The following screenshot shows you a typical edit page for a menu item. The new template select list is show open at the bottom of the shot.
This puts the control right where it should be, on the menu page. You no longer have to go back and forth between the Menu Manager and the Template Manager to get the assignment correct. In addition, you no longer have to clone an entire template just to change some of the options that the template designer has included. You'll also notice the new standard range of Toolbar actions that are available across the board in Joomla 1.6 (Save & New and also Save as Copy). Save & New will save the current style and then return you to a blank edit screen, allowing to create a new style without going back to the main list. When you click Save as Copy it will actually create a new copy of the style based on the one you have open and then return you to the edit screen. This works exactly the same way as your favourite word processor (except you miss out the step of choosing the new name).
We have also noticed that some template designers include a lot of options by which you can configure a template. To help make these more manageable, we now allow the designer to create there own groups of options, just like you would see in the Basic and Advanced parameter sliders when, for example, editing a module. The designer can actually include any number of these groups and each one will be shown in its own slider. This would allow a designer to have, for example, a set of basic options, some more advanced settings, and then another group to control fancy addons for the template.
The Templates List
You might be wondering where the ability to customise and preview the template has gone. Well, in the sub-menu there is a second link to Templates. The following screenshot shows you what the new tempates list looks like.
This list shows an improved version of the old template list. It includes the template thumb directly in the list (you used to have to hover over the template to see this). The template designer now has the option of providing a second, larger preview file that will popup when you click on the smaller thumb in the list. In the following screenshot, we've clicked on the template thumbnails.
When you click on the template name, you are provided with a list of all the files you can edit on the one page (this was previously split into a number of pages in Joomla 1.5). The following screenshot shows that you can edit the
component.php files and all the CSS files included in the template.
Clicking the filename allows you to edit the source for the file using a new highlighting editor as shown in the next screenshot.
Template management has gone to a whole new level in Joomla 1.6. The new template styles will provide designers and site administrators with previously unafforded flexibility without having to copy templates unnecessarily.
If you'd like to discuss these new features, please join in the Joomla Alpha 2 discussion on the forum. If you are wanting to see these features and action (and are feeling a little bit lucky), you can download and test the nightly build of Joomla 1.6 (note these features may take a day to come through).
Please keep in mind that we are still in an Alpha stage and many things are either broken or not working as planned.
Andrew Eddie is a co-founder of the Joomla Open Source project and is highly active in the version 1.6 development process. He currently operates a Joomla-based development and training consultancy New Life in IT, blogs regularly at the Art of Joomla and produces high-quality commercial Joomla extensions through his company JXtended.