View Single Post
  #2 (permalink)  
Old 07-04-2008, 11:17 PM
Davidoff Davidoff is offline
Junior Member
 
Join Date: Oct 2007
Posts: 27
Default

PHP Code:
$router Zend_Controller_Front::getInstance()->getRouter(); 

//tag/product
$router->addRoute(
    
'product',
    new 
Zend_Controller_Router_Route('tag/:product', array('controller' => 'products''action' => 'index'))
);

tag/category/product
$router
->addRoute(
    
'category-product',
    new 
Zend_Controller_Router_Route('tag/:category/:product', array('controller' => 'products''action' => 'index'))
);

//tag/category/sub-category/product
$router->addRoute(
    
'subcategory-category-product',
    new 
Zend_Controller_Router_Route('tag/:category/:sub-category/:product', array('controller' => 'products''action' => 'index'))
); 
These rules should work, provided that you dont have any forward slashes in your product or category names.
Reply With Quote