⚠ 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

call edit operation with specific parameter



Lazy
  • profile picture
  • Member

Posted 11 February 2012 - 20:53 PM

Hello!
I've just start to use Grocery and it looks great. Can you tell me is it possible to do such thing (i'll try to be as clear as my english let me):
i have a site with registration. After login in there are "user_id" variable in cookies. Now i have link "My account" that looks like this - http://test.dev/order/account/edit/12 - where '12' is user_id. Can i remove it from link and call edit operation with parameter "user_id" or something like this? Should i use custom models or callbacks for this? Or there is easier way?

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 12 February 2012 - 11:20 AM

Hello there,
Yes you can do this by using the add_action method. You can see an example at: http://www.grocerycrud.com/crud/example/add_action