category,subcategory routing

View: New views
1 Messages — Rating Filter:   Alert me  

category,subcategory routing

by ashish.sharma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi all,

i have very strange problem.

In my index.php i have defined routes for some action like this:

$routes['browse_subcat'] = new Zend_Controller_Router_Route(
    ':lang/:controller/browse/:category/:subcategory',
    array(
        'module' => 'default',                
        'lang' => 'en',        
        'action' => 'browse',
        'controller' => 'business'    
    )
);


$routes['browse'] = new Zend_Controller_Router_Route(
    ':lang/:controller/browse/:category',
    array(
        'module' => 'default',                
        'lang' => 'en',        
        'action' => 'browse',
        'controller' => 'business'
    )
);


In above routing my paging does not works.


Paging works fine if i define routing as

 ':lang/:controller/browse/:category/*' and
':lang/:controller/browse/:category/:subcategory/*',


as browse/category/page/2 and so on for other pages also.

but when i turn to url browse/category/subcategory/ it does not takes subcategory parameter from url and results does not comes as expected.

can anybody help me in this regard as to get my paging works properly and also resullts should filter on category and subcategory.Its really urgent.