Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 18th, 2012  |  syntax: PHP  |  size: 0.61 KB  |  hits: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. routing_dev.yml:
  2.     ...
  3.     _main:
  4.         resource: routing.yml
  5.     ....
  6.  
  7.  
  8. routing.yml:
  9.     ....
  10.     WebSiteCategoryBundle:
  11.        resource: "@WebSiteCategoryBundle/Controller/"
  12.        type:     annotation
  13.        prefix:   /    
  14.    ....
  15.  
  16.  
  17. src/WebSite/CategoryBundle/CategoryController.php:
  18.  
  19.     /**
  20.     * @Route("/catalog")
  21.     */
  22.     class CategoryController extends Controller
  23.     {
  24.  
  25.         /**
  26.          * @Route("/{alias}", name="show_category" )
  27.          * @Template()
  28.          */
  29.         public function showAction( $alias )
  30.         {
  31.           // some action here
  32.         }
  33.     }