Need help with module

edited April 2015 in Modules
Hi,

I have a module, and see table_actions, here can we place other fields from same table like I have one {deal_id}. How to do this. Thanks in advance.

$config['modules']['cert'] = array(
'module_name' => 'Cert',
'module_uri' => 'user/cert',
'model_name' => 'cert_model',
'model_location' => 'cert',
'default_col' => 'titlefield',
'display_field' => 'anotherfield',
'js' => array('user' => 'UsersController.js'),
'table_actions' => array('EDIT' => fuel_url(USERS_FOLDER.'/users/listing/{id}'),'DELETE'),
);

Comments

  • edited 3:48PM
    deal_id would need to be one of the returned fields in your list for it to get merged in. The {id} field is always included but set to be a hidden field. To add that field, you can include it in a select statement in your models list_items method like so:

    public function list_items($limit = NULL, $offset = NULL, $col = 'id', $order = 'asc', $just_count = FALSE) { $this->db->select('id, deal_id, .... other fields go here'); $data = parent::list_items($limit, $offset, $col, $order, $just_count); }
  • edited 3:48PM
    Thanks admin.
Sign In or Register to comment.