Hi All
My requirement is, how we delete table row using module.
I have create a module “abc_module” and I have added function “delete_data()” under this module. Code is below
$_id = ee()->uri->segment(3);
$_delete_data = ee()->model_name->delete_attendee($_id);
if($_delete_data == TRUE){
ee()->functions->redirect(ee()->functions->fetch_current_uri());
} else {
}
I have create a template “list” where I am dispalying a list of data. Code is below:
{exp:abc_module:abc_list paginate="bottom" limit="100" order_by="id"}
<tr>
<td>{count}</td>
<td>{id}</td>
<td>{firstname}</td>
<td>{lastname}</td>
<td>{email}</td>
<td><a href="http://{path=abc_module/delete_data}/{id}">Delete</a></td>
</tr>
{/exp:abc_module:abc_list}
But it’s not working, actually I am trying to do the same way like codeignitor.
Example:
In Module : “/module_name/functionname/”
In codeignitor : “/controller_name/functionname/”
Please check and advise
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.