sonata_page.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. sonata.page.router: 150
  9. router.default: 100
  10. sonata_page:
  11. multisite: host_with_path_by_locale # host
  12. use_streamed_response: false # set the value to false in debug mode or if the reverse proxy does not handle streamed response
  13. ignore_uri_patterns:
  14. - ^/administration(.*) # sonata admin
  15. - ^/api/(.*)
  16. - ^installer
  17. - ^/installer/(.*)
  18. - install.php
  19. ignore_route_patterns:
  20. - (.*)administration(.*) # ignore admin route, ie route containing 'admin' # sonata admin
  21. - ^_(.*) # ignore symfony routes
  22. - login
  23. - home
  24. - homepage
  25. - _settings
  26. - fos_user(.*)
  27. - chamilo_installer_flow
  28. - sylius_flow(.*)
  29. ignore_routes:
  30. - sonata_page_cache_esi
  31. - sonata_page_cache_ssi
  32. - sonata_page_js_sync_cache
  33. - sonata_page_js_async_cache
  34. - sonata_cache_esi
  35. - sonata_cache_ssi
  36. - sonata_cache_js_async
  37. - sonata_cache_js_sync
  38. - sonata_cache_apc
  39. - chamilo_installer_flow
  40. - sylius_flow_start
  41. - sylius_flow_display
  42. - sylius_flow_forward
  43. - chamilo_core_user_user_mycourses
  44. cache_invalidation:
  45. service: sonata.page.cache.invalidation.simple
  46. recorder: sonata.page.cache.recorder
  47. classes:
  48. "Application\Sonata\PageBundle\Entity\Block": getId
  49. assets:
  50. stylesheets:
  51. #- assetic/sonata_front_css.css
  52. javascripts:
  53. #- assetic/sonata_front_js.js
  54. default_template: default
  55. templates:
  56. default:
  57. #path: 'ApplicationSonataPageBundle::demo_layout.html.twig'
  58. path: '::layout.html.twig'
  59. name: 'default'
  60. containers:
  61. header:
  62. name: Header
  63. content_top:
  64. name: Top content
  65. content:
  66. name: Main content
  67. content_bottom:
  68. name: Bottom content
  69. footer:
  70. name: Footer
  71. matrix:
  72. layout: |
  73. HHHHHHHH
  74. TTTTTTTT
  75. CCCCCCCC
  76. BBBBBBBB
  77. FFFFFFFF
  78. mapping:
  79. H: header
  80. T: content_top
  81. C: content
  82. B: content_bottom
  83. F: footer
  84. 2columns:
  85. #path: 'ApplicationSonataPageBundle::default_2columns_layout.html.twig'
  86. path: '::layout.html.twig'
  87. name: '2 columns layout'
  88. containers:
  89. header:
  90. name: Header
  91. content_top:
  92. name: Top content
  93. left_col:
  94. name: Left content
  95. rigth_col:
  96. name: Right content
  97. content_bottom:
  98. name: Bottom content
  99. footer:
  100. name: Footer
  101. matrix:
  102. layout: |
  103. HHHHHHHH
  104. TTTTTTTT
  105. LLLLRRRR
  106. BBBBBBBB
  107. FFFFFFFF
  108. mapping:
  109. H: header
  110. T: content_top
  111. L: left_col
  112. R: rigth_col
  113. B: content_bottom
  114. F: footer
  115. page_defaults:
  116. homepage: { decorate: false, enabled: true }
  117. caches:
  118. esi:
  119. token: add an unique token here # default is a random value
  120. version: 3 # version 3 is the default on debian wheezy ...
  121. servers:
  122. - %sonata_page.varnish.command% # you need to adapt this line to work with your configuration
  123. ssi:
  124. token: add an unique token here # default is a random value
  125. catch_exceptions:
  126. not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key})
  127. fatal: [500] # so you can use the same page for different http errors or specify specific page for each error
  128. # Enable Doctrine to map the provided entities
  129. doctrine:
  130. orm:
  131. entity_managers:
  132. default:
  133. mappings:
  134. ApplicationSonataPageBundle: ~
  135. SonataPageBundle: ~