Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. 'news' => array(
  2. 'type' => 'Segment',
  3. 'options' => array(
  4. 'route' => '/news[/:id]',
  5. 'constraints' => array(
  6. 'id' => '[0-9]+',
  7. ),
  8. 'defaults' => array(
  9. 'controller' => 'ApplicationControllerNews',
  10. 'action' => 'index',
  11. ),
  12. ),
  13. 'may_terminate' => true,
  14. 'child_routes' => array(
  15. 'allnews' => array(
  16. 'type' => 'Segment',
  17. 'options' => array(
  18. 'route' => '[/:action[/:tab[/:page]]]',
  19. 'constraints' => array(
  20. 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
  21. 'tab' => '[0-9]+',
  22. 'page' => '[0-9]+',
  23. ),
  24. 'defaults' => array(
  25. 'controller' => 'ApplicationControllerNews',
  26. 'action' => 'all',
  27. 'tab' => 1,
  28. 'page' => 1,
  29. ),
  30.  
  31. ),
  32. ),
  33. ),
  34. ),
  35.  
  36. /news/2
  37.  
  38. /news/all/2/5
  39.  
  40. $this->url('news/allnews', array('action' => 'all', 'tab' => '1', 'page' => '1'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement