Jump to content


how set_crud_url_path and use of delete

set_crud_url_path delete

  • Please log in to reply
3 replies to this topic

#1 Jhonatán Marin

Jhonatán Marin

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 24 November 2016 - 07: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.

 



#2 Jhonatán Marin

Jhonatán Marin

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 24 November 2016 - 07:22 PM

I found this solution, does anyone have another?
 

 

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



#3 buoncri

buoncri

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationItaly

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



#4 buoncri

buoncri

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationItaly

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 http://www.grocerycr...-model-solved/.

 

Have a nice week ;-)







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users