dizballanze

Untitled

Jun 11th, 2011
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?php
  2. // bootstrap
  3. public function _initRoute(){
  4.         $router = Zend_Controller_Front::getInstance()->getRouter();
  5.         $route_test = new Zend_Controller_Router_Route(
  6.         '/:id/:seo',
  7.         array(
  8.             'controller' => 'flats',
  9.             'action' => 'view',
  10.                     'id' => 0
  11.         )
  12.     );
  13.     $router->addRoute('test', $route_test);
  14. }
  15.  
  16. // Controller flats, view action
  17. $id = $this->getRequest()->getParam('id');
  18. ?>
  19.  
  20. // View
  21. <a href="<?php $this->url(array('id'=>'1', 'seo'=>'blabla.html'), 'test'); ?>">link</a>
Advertisement
Add Comment
Please, Sign In to add comment