View filters and search

In a Joomla! 3 component, there is usually some view filters that allow you to limit the items shown, for instance, only showing items where the status is published. Besides the status filter, we usually expect to see search in title, sort table by, and ordering.

Sidebar filters

We will start off by adding the sidebar with a status filter. Edit the file /administrator/components/com_folio/views/folios/view.html.php.

<?php defined('_JEXEC') or die; class FolioViewFolios extends JViewLegacy { protected $items; protected $state; public function display($tpl = null) { $this->items = $this->get('Items'); $this->state = $this->get('State'); if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.