CakePHP routes with sub-folders -


i have problem cakephp route

router::connect(     '/catalog/:slug/:slug2/*', array(         'controller'=>'pages',          'action'=>'view' )) 

when have url /catalog/something/page:2 - catches link. shouldn't, because there no slash after params page:2, how fix it? thanks!!

i hope may helpful.

router::connect(     '/catalog/:slug/:slug2/*', array(         'controller'=>'pages',          'action'=>'view' ), array('pass' => array('slug', 'slug2'))); 

and in view file can write generate link above.

echo $this->html->link('link', array(     'controller' => 'pages',     'action' => 'view',     'slug' => 'slug',     'slug2' => 'slug2' )); 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -