Menu item parameters

Not everyone is going to use your component in the same way, so it's a good idea to add some menu item parameters (also known as options) to add some flexibility.

Adding a category filter on our menu

Currently, our folios view shows all of our folio items, but wouldn't it be nice if we could limit this view to only showing items in a particular category? Edit the default.xml file under /components/com_folio/views/folios/tmpl/ and make the following highlighted changes:

<?xml version="1.0" encoding="utf-8"?>
<metadata>
   <layout title="com_folio_folios_view_default_title" option="com_folio_folios_view_default_option">
      <message>
         <![CDATA[com_folio_folios_view_default_desc]]>
      </message>
   </layout>

   <fields name="request">
 <fieldset ...

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.