What I would guess is happening is that the new route you put in
place is matching everything including all the actions for your
products controller.
You might be able to add routes for each action in products to
override this.
But, could you just make a simple change and use "product" instead
of "products" for routes with a title?
for example
create link http://sitename/product/ [title of
product]/[id]
and use
Router::connect('/product/:title/:id/*',array('controller' =>
'products','action'=>'product_detail'),array('pass' =>
array('id','title')));
You could shorten this even more and just use "p" instead of product
in the URL if you want.
http://sitename/p/ [title
of product]/[id]
Just a thought.
On 11/2/2012 4:37 AM, pcs [via CakePHP]
wrote:
Hi ,
i am new to cakephp
link is http://sitename/products/product_detail/ [id]
and i need to create link http://sitename/products/ [title of
product]/[id]
Router::connect('/products/:title/:id/*',array('controller' =>
'products','action'=>'product_detail'),array('pass' =>
array('id','title')));
i did it in route.php
but it is routes all action of products to product detail page .
Thanks ,
If you reply to this email, your
message will be added to the discussion below:
http://cakephp.1045679.n5.nabble.com/Routing-Help-tp5712046.html
To start a new topic under CakePHP, email
[email protected]
To unsubscribe from CakePHP, click
here .
NAML
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/Routing-Help-tp5712046p5712065.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.