How can I put a dropdown on top of the page to filter a list? For example, filter articles by authors?
Thank you!


  • edited 2:13PM
    Im using simple models...
  • edited 2:13PM
    The navigation module may be a good one to look at. The module has the 'filter' parameter set on at fuel/modules/fuel/config/fuel_modules.php which takes an array of parameters similar to what you would use for form_builder. The options for the select are actually set in the fuel/modules/fuel/controllers/navigation.php file in the list_items method however, they could be set within the fuel_modules file as well.
  • edited 2:13PM
    I created a controller inside controllers/ with this:


    class Questions extends CI_Controller {

    function __construct(){

    function items(){
    $this->filters['area_id']['options'] = $this->Areas_model->options_list('id', 'name', array(), false);



    But it doesn't work :(
    It's obvious im doing something wrong here...
    Any thoughts?
  • edited 2:13PM
    You'll want to extend the Module controller.
  • edited 2:13PM
    you mean Base_module_controller?
  • edited 2:13PM
    ive replaced Base_module_controller with CI_Controller, doesnt work either
  • edited 2:13PM
    The fuel/modules/fuel/controllers/navigation.php file should have at the top the following:

    require_once('module.php'); class Navigation extends Module {
    In your case the require_once will probably need a different path to point to the module.php file since your model will exist somewhere else. Does that make sense?
Sign In or Register to comment.