Creating another view

Now we are going to create another view that is dedicated to each individual item, and will show a larger image. We will make this view appear when you click on the title of an item. This view will be important when we integrate comments in our extension later in this chapter.

Create the folio.php file under /components/com_folio/controllers/ and add the following code:

<?php
defined('_JEXEC') or die;

class FolioControllerFolio extends JControllerForm
{
}

This code is similar to our controller for our folios view where all of the functionality is inherited from the parent class.

Now, create the model file at /components/com_folio/models/folio.php, and add the following code. This code is pretty much the same as the folios model; ...

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.