sonata_page.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. - ^/cms/page/courses
  49. - ^/cms/page/courses/(.*)
  50. - ^/css/themes/(.*)/(.*)/(.*)
  51. - ^/assets/(.*)/(.*)/(.*)
  52. ignore_route_patterns:
  53. - (.*)administration(.*) # ignore admin route, ie route containing 'admin' # sonata admin
  54. - ^_(.*) # ignore symfony routes
  55. - fos_user(.*)
  56. - sylius_flow(.*)
  57. ignore_routes:
  58. - home
  59. - elfinder
  60. - login
  61. - logout
  62. - fos_js_routing_js
  63. - _settings
  64. - main
  65. - sonata_page_cache_esi
  66. - sonata_page_cache_ssi
  67. - sonata_page_js_sync_cache
  68. - sonata_page_js_async_cache
  69. - sonata_cache_esi
  70. - sonata_cache_ssi
  71. - sonata_cache_js_async
  72. - sonata_cache_js_sync
  73. - sonata_cache_apc
  74. - chamilo_installer_flow
  75. - sylius_flow_start
  76. - sylius_flow_display
  77. - sylius_flow_forward
  78. - chamilo_core_user_user_mycourses
  79. - chamilo_page_page_getlatestpages
  80. - chamilo_page_page_getlatestblocks
  81. - chamilo_page_page_getlatestcourses
  82. cache_invalidation:
  83. service: sonata.page.cache.invalidation.simple
  84. recorder: sonata.page.cache.recorder
  85. classes:
  86. "Chamilo\PageBundle\Entity\Block": getId
  87. assets:
  88. stylesheets:
  89. - assetic/sonata_front_css.css
  90. javascripts:
  91. - assetic/sonata_front_js.js
  92. default_template: default
  93. templates:
  94. default:
  95. path: 'ChamiloPageBundle::demo_layout.html.twig'
  96. # path: '::layout.html.twig'
  97. name: 'default'
  98. containers:
  99. header:
  100. name: Header
  101. content_top:
  102. name: Top content
  103. content:
  104. name: Main content
  105. content_bottom:
  106. name: Bottom content
  107. footer:
  108. name: Footer
  109. image_preview:
  110. name: Image preview
  111. matrix:
  112. layout: |
  113. HHHHHHHH
  114. TTTTTTTT
  115. CCCCCCCC
  116. BBBBBBBB
  117. FFFFFFFF
  118. IIIIIIII
  119. mapping:
  120. H: header
  121. T: content_top
  122. C: content
  123. B: content_bottom
  124. F: footer
  125. I: image_preview
  126. 2columns:
  127. path: 'ChamiloPageBundle::demo_2columns_layout.html.twig'
  128. # path: '::layout.html.twig'
  129. name: '2 columns layout'
  130. containers:
  131. header:
  132. name: Header
  133. content_top:
  134. name: Top content
  135. left_col:
  136. name: Left content
  137. rigth_col:
  138. name: Right content
  139. content_bottom:
  140. name: Bottom content
  141. footer:
  142. name: Footer
  143. matrix:
  144. layout: |
  145. HHHHHHHH
  146. TTTTTTTT
  147. LLLLRRRR
  148. BBBBBBBB
  149. FFFFFFFF
  150. mapping:
  151. H: header
  152. T: content_top
  153. L: left_col
  154. R: rigth_col
  155. B: content_bottom
  156. F: footer
  157. page_defaults:
  158. homepage: { decorate: false, enabled: true }
  159. home: { decorate: false, enabled: true }
  160. caches:
  161. esi:
  162. token: add an unique token here # default is a random value
  163. version: 3 # version 3 is the default on debian wheezy ...
  164. servers:
  165. - %sonata_page.varnish.command% # you need to adapt this line to work with your configuration
  166. ssi:
  167. token: add an unique token here # default is a random value
  168. catch_exceptions:
  169. not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key})
  170. fatal: [500] # so you can use the same page for different http errors or specify specific page for each error
  171. # Enable Doctrine to map the provided entities
  172. doctrine:
  173. orm:
  174. entity_managers:
  175. default:
  176. mappings:
  177. ChamiloPageBundle: ~
  178. SonataPageBundle: ~