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.
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?
Comments
<?php
class Questions extends CI_Controller {
function __construct(){
parent::__construct();
}
function items(){
$this->load->model('Areas_model');
$this->filters['area_id']['options'] = $this->Areas_model->options_list('id', 'name', array(), false);
parent::items();
}
}
?>
But it doesn't work
It's obvious im doing something wrong here...
Any thoughts?
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?