Joomla! Day UK 2009 Template Design

  • View

  • Download

Embed Size (px)


Slide 1

Joomla! Day UK 2009

Joomla! Day UK 2009

Template Design

Chris Davenport
Joomla! Core Team

Providing a flexible platform for digital publishing and collaboration.

Understanding templates

Joomla has an incredibly powerful template system,yet surprisingly few template designersactually make use of this power.

Use a reset script

Tip: Always use a browser reset script.

eg. Eric Meyer's reset.css

You can be clever and use the Joomla API:

$reset = '/templates/' . $this->template . '/css/reset.css';$this->addStylesheet( $this->baseurl . $reset );

Or use a CSS framework


Template execution

Template execution is a two-phase process.

Phase 1: All PHP code is executed.

Phase 2: All jdoc:include statements are replaced.


Template execution

In phase 1 all the PHP code is executedIn phase 2 all the jdoc:include statements are replacedBefore execution

After Phase 1

Main Menu

  • ...... other HTML omitted ......

    Template execution

    After Phase 2

    What does it mean?

    Calls to $this->addScript() and similar API calls can be placed anywhere in the template.

    jdoc:include statements can be constructed programmatically.