sonata_page.yml 6.0 KB

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