Re: route and parameter

2007-02-20 Thread Sergei

I have to reply to myself:

$Route->connect('/topic/(\d+).html', array('controller' => 'posts',
'action' => 'view'));

That's it!

(\d+) is regexp meaning one or more any digit.



On 20 фев, 15:20, "Sergei" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have Posts controller and View(id) action. Simple.
>
> How can I make a route url to access it:
>
> /topic/123.html
>
> where "123" is the ID parameter of View action?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



route and parameter

2007-02-19 Thread Sergei

Hello,

I have Posts controller and View(id) action. Simple.

How can I make a route url to access it:

/topic/123.html

where "123" is the ID parameter of View action?

Tried different variants but no luck.
Thank you.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---