Wednesday, April 13, 2011

Help with seo url and settins routers in CakePHP 1.2.10

Hi i have problem with setting routering. I need url like: /slug-
category-somestring-filtertype my router:

Router::connect('/:slug-somestring-:filtertype',
array('controller'=>'goods','action'=>'index'),
array('slug' => '[a-zA-Z0-9\-]+','filtertype'=>'c|k','pass' =>
array('slug','filtertype'))
);

link generate:

$html->url(array('controller'=>'goods','action'=>'index','slug'=>
$mark['Mark']['seourl'],'filtertype'=>'k'));

But this didnt generate url: /slug-category-somestring

If i try this:

Router::connect('/:slug/somestring/:filtertype',
array('controller'=>'goods','action'=>'index'),
array('slug' => '[a-zA-Z0-9\-]+','filtertype'=>'c|k','pass' =>
array('slug','filtertype'))
);

generate: url: /slug-category/somestring/filtertypevalue

Please help me, thank you.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate