Adding columns to your view
In our default list view that shows all our portfolio items in the backend, we currently only have a checkbox and the Title
column, so we need to add a few more columns in here. We will concentrate on the company
and id
columns initially, and then add status
and ordering
columns which are a bit more complex.
Adding simple columns
The first thing we need to do is adjust our model so that it selects the data from the database table jos_folio
that we want to display in this view. Edit the file /administrator/components/com_folio/models/folios.php
, and add the highlighted code:
<?php defined('_JEXEC') or die; class FolioModelFolios extends JModelList { public function __construct($config = array()) { if (empty($config['filter_fields'])) ...
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.