⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how set_crud_url_path and use of delete



Jhonatán Marin
  • profile picture
  • Member

Posted 24 November 2016 - 19:07 PM

Greetings from Colombia,
 
I have been using grocery for more than 1 year, today I acquired the bootstrap theme, I would like to know if it is possible to use only the "datatables list" (set_crud_url_path) and still be able to delete records.

 


Jhonatán Marin
  • profile picture
  • Member

Posted 24 November 2016 - 19:22 PM

I found this solution, does anyone have another?
 

 

$state = $crud->getState();
if($state == 'list')
{
     redirect('your_controller/elencoUtenti');
}


buoncri
  • profile picture
  • Member

Posted 25 November 2016 - 08:10 AM

no, but yor solution seems nice :-D

 

Reading from the doc ...

 

set_crud_url_path - void set_crud_url_path(string $crud_url_path [, string $list_url_path ])

I think you can try to give the second parameter for the list url path.

 

After this i'm going to try, if have news i'll bring here


buoncri
  • profile picture
  • Member

Posted 25 November 2016 - 08:19 AM

It looks good. The second parameter control the go back to list button, so you can always go back to your datatables list wiev.

 

One example of use i found is in /topic/1790-grocerycrud-multigrid-and-set-model-solved/.

 

Have a nice week ;-)