Good day! The question is, now in SEO there is a tendency of "correct" setting of the product catalog filters. Customize this business so that when combining a number of filtered properties in the URL of the site is not just passed some parameters, for example:

www.site.ru/katalog/telefoni/?brend=sumsung&min_price=3000 

Specifically, a new URL was formed, in whole or in part, for example:

 www.site.ru/katalog/telefoni/brend/sumsung/?min_price=3000 

This link

www.site.ru/katalog/telefoni/brend/sumsung/

can already be used in advertising campaigns, for example, on Yandex.Direct. Clicking on it, the user, in fact, falls into the directory

 www.site.ru/katalog/telefoni/ 

with filter on brands and price.

How realistic is it to set up routing in ZF so that the first 2 parts of the URL are understood as usual ( /модель/действие/ your own words, in a ZF beginner), and the rest parts as a filter?

Thank you in advance!

  • one
    newbie -> beginner grammatical -> literate how much -> how much advertising companies -> advertising campaigns - etki
  • urly creepy you. All you want to do is in the documentation and a huge number of articles. - VasyOk
  • Thanks, CAPES joxi.ru/n2Y813XI7ebxm6 - maler1988
  • @ maler1988, well, honestly, dudes like me find it difficult to read texts like the ones above. A separate hell begins when you make mistakes yourself and confuse the cases, but this is already my personal hell. Hold: shipit:! [] ( Pic20.picturetrail.com/VOL1621/8562246/15897778/242492034.jpg ) - etki

1 answer 1

You can use the Zend_Controller_Router_Rewrite class, for example:

  $router = new Zend_Controller_Router_Rewrite(); $router->addRoute('articles', new Zend_Controller_Router_Route('articles/:articleId', array('controller' => 'articles', 'action' => 'view')) ); $router->addRoute('pages', new Zend_Controller_Router_Route('pages/:pageId', array('controller' => 'index', 'action' => 'page')) );