]> Raphaƫl G. Git Repositories - treebundle/blobdiff - config/routes/rapsystree.yaml
Replace element path by name key
[treebundle] / config / routes / rapsystree.yaml
index cb028f03016db740f38395829eb1b7ebe2ca9ff8..d52b99863f94a1afa4e951b89f15bea36f456270 100644 (file)
@@ -13,6 +13,21 @@ rapsystree_about:
     controller: Rapsys\TreeBundle\Controller\TreeController::about
     methods: GET
 
     controller: Rapsys\TreeBundle\Controller\TreeController::about
     methods: GET
 
+rapsystree_album:
+    path:
+        en_gb: '/en/album/{id}/{slug}{path}'
+        fr_fr: '/album/{id}/{slug}{path}'
+    controller: Rapsys\TreeBundle\Controller\TreeController::album
+    defaults:
+        id: ~
+        path: ~
+        slug: ~
+    requirements:
+        id: '\d+'
+        path: '/.*'
+        slug: '[\w-]+'
+    methods: GET|POST
+
 rapsystree_contact:
     path:
         en_gb: '/en/contact'
 rapsystree_contact:
     path:
         en_gb: '/en/contact'
@@ -20,20 +35,6 @@ rapsystree_contact:
     controller: Rapsys\TreeBundle\Controller\TreeController::contact
     methods: GET
 
     controller: Rapsys\TreeBundle\Controller\TreeController::contact
     methods: GET
 
-rapsystree_directory:
-    path:
-        en_gb: '/en/directory/{path<.+>?}'
-        fr_fr: '/chemin/{path<.+>?}'
-    controller: Rapsys\TreeBundle\Controller\TreeController::directory
-    methods: GET
-
-rapsystree_document:
-    path:
-        en_gb: '/en/document/{file<.+>?}'
-        fr_fr: '/document/{file<.+>?}'
-    controller: Rapsys\TreeBundle\Controller\TreeController::document
-    methods: GET
-
 rapsystree_terms_of_service:
     path:
         en_gb: '/en/terms-of-service'
 rapsystree_terms_of_service:
     path:
         en_gb: '/en/terms-of-service'
@@ -61,6 +62,19 @@ rapsysuser_edit:
         hash: '[a-zA-Z0-9=_-]+'
     methods: GET|POST
 
         hash: '[a-zA-Z0-9=_-]+'
     methods: GET|POST
 
+rapsystree_element:
+    path:
+        en_gb: '/en/element/{id}{path}'
+        fr_fr: '/element/{id}{path}'
+    controller: Rapsys\TreeBundle\Controller\TreeController::element
+    defaults:
+        id: ~
+        path: ~
+    requirements:
+        id: '\d+'
+        path: '/.*'
+    methods: GET|POST
+
 rapsysuser_index:
     path:
         en_gb: '/en/user'
 rapsysuser_index:
     path:
         en_gb: '/en/user'