Creating the view

In Joomla! the content is separated from the presentation, so we need to create a view file to display the content. The view should not contain any database queries, we only want to use the view to present the content, we don't care where the data comes from and we don't care how it is stored. This allows a user to potentially create a template override of this view and modify the output without having any clue about how the rest of the module works.

Within your mod_latestextensions folder, create a folder called tmpl. Create an index.html file within this folder.

<!DOCTYPE html><title></title>

Now create a default.php file within this tmpl folder, and add the following code:

<?php defined('_JEXEC') or die; ?> <div class="latestextensions<?php ...

Get Learning Joomla! 3 Extension Development - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.