Work In Progress

This book is currently work in progress. Some sections are not yet written. Thank you for your understanding!

View templates

Modules need to be able to display information in a human-readable manner, in HTML — this is their only purpose in life. The Helper handles all the business logic to produce this data, and the Dispatcher pushes it to our view template which renders it as HTML.

The view templates are placed in the tmpl folder of your module.

The concept is not unlike Components themselves, with a few twists. The most obvious twist is that a module's view template always produces HTML. The second twist is how we get our display data: as “magically” appearing variables.

To refresh your memory, the Dispatcher's getLayoutData method returns an array. Joomla! puts that array through PHP's extract() function before loading our view template.