sonata_page.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # more information can be found here http://sonata-project.org/bundles/page
  2. cmf_routing:
  3. chain:
  4. routers_by_id:
  5. # enable the DynamicRouter with high priority to allow overwriting configured routes with content
  6. #symfony_cmf_routing_extra.dynamic_router: 200
  7. # enable the symfony default router with a lower priority
  8. router.default: 150 # First chamilo/symfony2 router
  9. sonata.page.router: 100 # then the page router
  10. sonata_page:
  11. class:
  12. page: Chamilo\PageBundle\Entity\Page
  13. site: Chamilo\PageBundle\Entity\Site
  14. block: Chamilo\PageBundle\Entity\Block
  15. snapshot: Chamilo\PageBundle\Entity\Snapshot
  16. multisite: host_with_path # host
  17. use_streamed_response: false # set the value to false in debug mode or if the reverse proxy does not handle streamed response
  18. ignore_uri_patterns:
  19. - ^/administration(.*) # sonata admin
  20. - ^/admin(.*) # chamilo admin
  21. - ^/main(.*)
  22. - /(.*)/(.*)administration(.*)/
  23. - ^/api/(.*)
  24. - ^install
  25. - ^/install/(.*)
  26. - ^/packages/(.*)
  27. - ^/package/(.*)
  28. - install.php
  29. - install.php/(.*)
  30. - install.php/packages/(.*)
  31. - install.php/package/(.*)
  32. - install.php/(.*)/(.*)
  33. - ^/bundles/(.*)
  34. - ^/_wdt/(.*)
  35. - ^/_profiler/(.*)
  36. - ^/userportal
  37. - ^/userportal/(.*)
  38. - ^/js/(.*)
  39. - ^/faq/(.*)
  40. - ^/faq
  41. - ^/courses/(.*)
  42. - ^/front/editor
  43. - ^/contact(.*) # sonata admin
  44. - ^/cms/page/latest
  45. - ^/cms/page/latest/(.*)
  46. - ^/cms/page/blocks
  47. - ^/cms/page/blocks/(.*)
  48. ignore_route_patterns:
  49. - (.*)administration(.*) # ignore admin route, ie route containing 'admin' # sonata admin
  50. - ^_(.*) # ignore symfony routes
  51. - fos_user(.*)
  52. - sylius_flow(.*)
  53. ignore_routes:
  54. - home
  55. - elfinder
  56. - login
  57. - logout
  58. - fos_js_routing_js
  59. - _settings
  60. - main
  61. - sonata_page_cache_esi
  62. - sonata_page_cache_ssi
  63. - sonata_page_js_sync_cache
  64. - sonata_page_js_async_cache
  65. - sonata_cache_esi
  66. - sonata_cache_ssi
  67. - sonata_cache_js_async
  68. - sonata_cache_js_sync
  69. - sonata_cache_apc
  70. - chamilo_installer_flow
  71. - sylius_flow_start
  72. - sylius_flow_display
  73. - sylius_flow_forward
  74. - chamilo_core_user_user_mycourses
  75. - chamilo_page_page_getlatestpages
  76. - chamilo_page_page_getlatestblocks
  77. cache_invalidation:
  78. service: sonata.page.cache.invalidation.simple
  79. recorder: sonata.page.cache.recorder
  80. classes:
  81. "Chamilo\PageBundle\Entity\Block": getId
  82. assets:
  83. stylesheets:
  84. - assetic/sonata_front_css.css
  85. javascripts:
  86. - assetic/sonata_front_js.js
  87. default_template: default
  88. templates:
  89. default:
  90. path: 'ChamiloPageBundle::demo_layout.html.twig'
  91. # path: '::layout.html.twig'
  92. name: 'default'
  93. containers:
  94. header:
  95. name: Header
  96. content_top:
  97. name: Top content
  98. content:
  99. name: Main content
  100. content_bottom:
  101. name: Bottom content
  102. footer:
  103. name: Footer
  104. image_preview:
  105. name: Image preview
  106. matrix:
  107. layout: |
  108. HHHHHHHH
  109. TTTTTTTT
  110. CCCCCCCC
  111. BBBBBBBB
  112. FFFFFFFF
  113. IIIIIIII
  114. mapping:
  115. H: header
  116. T: content_top
  117. C: content
  118. B: content_bottom
  119. F: footer
  120. I: image_preview
  121. 2columns:
  122. path: 'ChamiloPageBundle::demo_2columns_layout.html.twig'
  123. # path: '::layout.html.twig'
  124. name: '2 columns layout'
  125. containers:
  126. header:
  127. name: Header
  128. content_top:
  129. name: Top content
  130. left_col:
  131. name: Left content
  132. rigth_col:
  133. name: Right content
  134. content_bottom:
  135. name: Bottom content
  136. footer:
  137. name: Footer
  138. matrix:
  139. layout: |
  140. HHHHHHHH
  141. TTTTTTTT
  142. LLLLRRRR
  143. BBBBBBBB
  144. FFFFFFFF
  145. mapping:
  146. H: header
  147. T: content_top
  148. L: left_col
  149. R: rigth_col
  150. B: content_bottom
  151. F: footer
  152. page_defaults:
  153. homepage: { decorate: false, enabled: true }
  154. home: { decorate: false, enabled: true }
  155. caches:
  156. esi:
  157. token: add an unique token here # default is a random value
  158. version: 3 # version 3 is the default on debian wheezy ...
  159. servers:
  160. - %sonata_page.varnish.command% # you need to adapt this line to work with your configuration
  161. ssi:
  162. token: add an unique token here # default is a random value
  163. catch_exceptions:
  164. not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key})
  165. fatal: [500] # so you can use the same page for different http errors or specify specific page for each error
  166. # Enable Doctrine to map the provided entities
  167. doctrine:
  168. orm:
  169. entity_managers:
  170. default:
  171. mappings:
  172. ChamiloPageBundle: ~
  173. SonataPageBundle: ~