Config
- Single Page
Posted 31 January 2013 - 19:18 PM
$config['grocery_crud_default_per_page'] = 10;
$output = $crud->render($config);
Or is the only place the config can be changed is in the config file itself? I want to be able to change the default per page with the different instances of grocery crud.
Posted 31 January 2013 - 19:35 PM
$this->config->load('grocery_crud');
$this->config->set_item('grocery_crud_default_per_page', '100');
$crud = new grocery_CRUD();
// ........
but you can use only '10', '25', '50', '100'.
because there is one line in the library which contain it:
$data->paging_options = array('10', '25', '50', '100');
You can change it as you like.
Posted 31 January 2013 - 19:52 PM
I see I ran into this issue because of a lack of knowledge of the codeignitor config class.
Posted 31 January 2013 - 20:01 PM
Just have a look under /application/config. There are numerous files that hold the configuration of your application.
Check the file /application/config/grocery_crud.php for the specific configuration about grocery_crud.
And here: http://ellislab.com/codeigniter/user-guide/libraries/config.html all the details about the CI's Config class.