Wouldn't it be nice if we could mark some of our folio items as featured, kind of like what you do with articles, and then display these featured items in a module on our website?
Before we create this module, we will need to make some enhancements to com_folio
to allow folio items to be marked as featured. We can copy a lot of this functionality from com_content
, but there is no point reinventing the wheel.
The first thing we want to do is to add the featured
field to our database table jos_folio
. Edit /administrator/components/com_folio/sql/install.mysql.utf8.sql
, and add the following:
`featured` tinyint(3) unsigned NOT NULL DEFAULT '0',
You should also add a SQL update file for this database change, for example, /administrator/components/com_folio/sql/updates/mysql/2.9.2.sql
.
ALTER TABLE `#__folio` ADD `featured` tinyint(3) unsigned NOT NULL DEFAULT '0';
And, add this to the Microsoft SQL files too, so edit /administrator/components/com_folio/sql/install...