How to add a link on a column.
I am trying to make a pdf file download
$this->data_table->add_action('file', 'assets/pdf/order/{file}', 'url');
but i get url with no file name like this:
http://localhost/ch/invoice/admin/assets/pdf/order/_______ filename mising here
what is the problem?
Or I should try other way to get the file downloaded from the datatable.
Comments
I have added a route on my module as so: The first one routes correctly to controller but if I give a parameter id on that controller like so: it gives 404.
On my config/invoice_fuel_modules.php I have set the table_actions like so: How to solve this.
'table_actions' => array('EDIT', 'PRINT' => fuel_url('invoice/orders/print_order/{id}'))
I am giving the whole structure of my site:
controller:
invoice/controllers/orders.php
invoice/orders/print_order/4
Instead of:
fuel/invoice/orders/print_order/4
This is main problem. I appreciate your availability.
I can view if I remove /4
for temporary solution I added a method on modules/fuel/controllers/module.php still I am waiting for permanent solution on advanced custom modules to add methods and parameters but without 404.
like:
foreach($invoice_controllers as $c) { $route[FUEL_ROUTE.'invoice/'.$c] = FUEL_FOLDER.'/module'; $route[FUEL_ROUTE.'invoice/'.$c.'/(.*)'] = FUEL_FOLDER.'/module/$1'; }
here is the code: now you are good to do stuff like codeigniter way: