sonata_page.yml 5.6 KB

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