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 ...