How To Use JHtmlSidebar::addFilter

If you are developing Joomla 3.x components you should familiar with this code:

This code will create a drop down list to filter the items based on their state. This JHtmlJGrid is defined on /joomlapath/libraries/cms/html/jgrid.php and you can see the available options on jgrid.publishedOptions function. Here are the complete list:

So if you want to show only some options on the filter drop down list you can use the following code: 

 

Leave a Comment

Your email address will not be published. Required fields are marked *