The problem is that in your link you don't use the 'gal_slug' key for the array. So the router doesn't understand that you mean it to be a gal_slug route. The pass key in the options, isn't bidirectional unfortunately.
-Mark On Aug 15, 9:02 pm, "Dave Maharaj" <[email protected]> wrote: > I have my gallery controller and each gallery has a slug so the url looks > like gallery/fishing (if manually typed in) > > Routed like -> Router::connect('/gallery/:gal_slug',array('controller' => > 'galleries' , 'action' => 'view'), array( 'gal_slug' => > '[-_A-Za-z0-9]+','pass' => array('gal_slug' ) ) ); > > Then in my gallery index.ctp I have <?php echo $this->Html->link(__('View', > true), array('controller' => 'galleries' , 'action' => 'view', > $gallery['Gallery']['slug'])); ?> but the url when hover/clicked over the > link shows "view" -> gallery/view/fishing. > > How can I get it so it removes the "view" from the url? > > Thanks > > Dave Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
