The way - we create simple modules--> awesome.
Now - If I want to over ride the CRUD functionality behind CREATE/UPDATE/SELECT/DELETE, I need to define a controller for the model and just over ride respective methods?
for example : while creation of record - I also want to call a webservice - Can I accomplish by overriding a create method in controller?
Where do I over ride the views create view, edit, delete view, listing. Basically - I might need aditional buttons on the view screens.
Please let me know if Advanced modules is the way to go. The issue I have is -- I like the views as is - just need additional functionality around controller and views.
thanks
sid
Comments
... 'views' => array( 'list' => '_layouts/module_list', 'create_edit' => '_layouts/module_create_edit', 'delete' => '_layouts/module_delete'), ...
You can also set the a "view_location" property on your controller, which tells FUEL which module folder to look in for the view files.
Additionally, there are "list_actions" and "item_action" simple module properties that can use to to add additional buttons. Below is an example of a list_actions module parameter used by the navigation module to add the upload button:
'list_actions' => array('navigation/upload' => lang('btn_upload'))
Item actions appear in the form view and specify which buttons to appear at the top. Below is an example used by the pages module and note the 'others' key value which contains the custom upload button:
'item_actions' => array('save', 'view', 'publish', 'delete', 'duplicate', 'create', 'others' => array('pages/upload' => lang('btn_upload'))),
http://www.getfuelcms.com/user_guide/modules/simple
But when I try to call the model in the controller - I get model and method undefined.
Seems like the controller is not getting the model.
Do I need to load it somewhere?
However, I am trying to just have a controller in the controller folder. I have a model in models folder (Simple Modules)
Then in control, I am trying to access model like
$this->model->getSysConfig($user_id);
in My_fuel_modules - i have added the url --> 'my_controller/my_method'
The link shows on the dashboard and program control goes to "my_method" method.
print_r($this->model_name);
Thanks a lot --> this should work now.