sonata_page.yml 5.7 KB

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