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

c++ - Linked List error when inserting for the last time -

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

tsql - Pivot with Temp Table (definition for column must include data type) -- SQL Server 2008 -