Building a Joomla!TM template is possible by just using HTML and CSS. But if you want to make things a bit more fancy (hiding columns, special component-layouts, optimizing CSS), you'll need PHP-code to accomplish this. When using templates from known template-clubs like YooTheme, RocketTheme or JoomlArt, this functionality is offered through frameworks like Gantry or Zen Grid. Let's see what's all that about.
Advanced Joomla! templating
We are talking here about advanced Joomla! template, the basics being HTML/CSS and jdoc-tags. Advanced templating includes PHP-logic (like the countModules method) to allow for more intelligence within the template. But it also includes JavaScript applets (built using MooTools or jQuery), chunks of Joomla! code to automate things like building menus and allowing specific page-layouts, and CSS frameworks.
If you are just building one template for yourself, it's no use to build a special library for all the things you want to do within the template. But template-clubs like JoomlArt and RocketTheme are in the business of making templates, and once you start building tens of templates, you'll want to automate some things as well: That's what a framework is for.
A templating framework offers ways to quickly setup or manage the code of a template, including all the advanced features that a professional template should have. Some work is based on PHP, so therefor PHP-scripts are included which are basically the same for all templates. Some other work is based on JavaScript, for which existing frameworks like jQuery and MooTools can be used. This article is aiming at the PHP-stuff within templates.
Some frameworks
To list some of the frameworks we are talking about here:
- RocketTheme: Gantry framework
- YooTheme: Warp5 framework
- JoomlArt: T3 framework
- Joomla Bamboo: Zen Grid framework
Some other template-related frameworks include Morph, which (to my understanding) adds a different templating layer instead of the default Joomla! template-layer (jdoc-tags).
I also have to say that apart from these frameworks (and I miss a couple of really nice ones) there are some template-frameworks which are basically just template-frames without any PHP-logic. These are skipped in this listing on purpose, because they only deal with the basic templating instead of the advanced templating.
960s grid
Interesting to know is that a lot of these frameworks are using the CSS-framework 960s. With 960s the webdesign is divided into blocks of equal proportions - 12 columns of each 60 pixels wide. This makes it a lot easier to design a boxmodel (a basic drawing of the website) which can then be picked up by a graphical designer (who creates a PSD design) without confronting the webdesigner with impossible layouts. It's a simple system, predefining CSS and HTML, making the design more strict but more time-efficient as well.
Frameworks, use it or not?
The frameworks (Gantry, Warp5, T3, etcetera) were primarily built by the template-clubs to aid themselves: They are sometimes sparsely documented, but still GPL-ed because they simply hook into the Joomla! framework which is GPL-ed as well. The PHP-code is still copyrighted but the GPL makes it possible to reuse the framework-code as you see fit.
We'll hope to discover some features of these frameworks in the upcoming months, showing you how the internals of various commercial templates work. But also showing you how you could use the framework-tools to build your own template.
YireoTmplHelper
It may be the year of templating frameworks: We decided to put something together as well. With our free YireoTmplHelper you can automate some complicated tasks (splitmenu, SEO-optimization, CSS-crunching) without too much PHP-code and without switching over to a complete template-framework. YireoTmplHelper is for sure not a framework on it's own, it's just an extra PHP-class which helps you along the way.


