Filter on category in list view and export filtered data
After years of trying to build my own CMS solutions on top of Codeigniter I am diving into Fuel now and really loving it! I am wondering if the following is possible. I have an advanced module with -among others - e-mail addresses and categories. I would like to filter the admin list view on category and use the export button just to export that category. Would be great if anyone could point me in the right direction. Thanks!
Comments
public $filters = array('category');
Similarly, to add a filtering control to your module, you can add a "filters" parameter to your module which specifies a form builder array of controls for the filtering:
'filters' => array('category' => array('type' => 'select', 'options' => array('option1' => 'option1', 'option2' => 'options2')))
Alternatively, you can set a "filters" method in your model that returns the Form_builder array as well.
For the export button, you can overwrite the "export_data" on your module's model.