Yii Framework Forum: Url Rules And Symbols - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Url Rules And Symbols Rate Topic: -----

#1 User is offline   yogibear0810 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 29-May 12

Posted 21 December 2012 - 10:49 AM

Hi Guys & Gals

Hopefully a nice easy one. I'm using the following url rule to pass a string to actionUpdate this works perfectly. :) Is it possible to pass a string with symbols particularly an @ sign, if an @ sign is not possible a - (dash) would also do as well.

'admin/imageGallery/<controller:\w+>/<action:\w+>/<id:\w+>'=>'imageGalleryDisplay/<controller>/<action>',


Thanks
Yogi
0

#2 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,342
  • Joined: 21-February 11
  • Location:Greece

Posted 21 December 2012 - 04:39 PM

Hi yogibear0810

If I understood you want to pass as value a string like your-act@ion

so, you could use something like that

'admin/imageGallery/<controller:\w+>/<action:\w+>/<id:[a-zA-Z0-9\-@]+>'=>'imageGalleryDisplay/<controller>/<action>',

Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#3 User is offline   yogibear0810 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 29-May 12

Posted 02 January 2013 - 04:21 AM

Sorry for the delay in replying, Christmas :)

Thanks for your help, it worked perfectly!

View PostKonApaz, on 21 December 2012 - 04:39 PM, said:

Hi yogibear0810

If I understood you want to pass as value a string like your-act@ion

so, you could use something like that

'admin/imageGallery/<controller:\w+>/<action:\w+>/<id:[a-zA-Z0-9\-@]+>'=>'imageGalleryDisplay/<controller>/<action>',


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users