O'Reilly logo

Mastering Joomla! 1.5 Extension and Framework Development by Chuck Lanham, James Kennard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Layouts (templates)

Layouts (templates) are used in modules in much the same way as they are in components. Module layouts allow us to define multiple appearances for data.

Layouts are essentially template files that consist of mostly XHTML interlaced with snippets of PHP. For a complete explanation of how to build template files, please refer to Chapter 9, Customizing the Page.

Site templates can override module layouts. To render a module using a layout, we use the getLayoutPath() method in the static JModuleHelper class. This method determines the location of a template file based on two parameters: the parsed module name and the layout name.

Our module will have three layout files that will be described in the following text. The first layout ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required