Version

Documentation » Page

11. Pages Services »

« 9. Command Line Tools

10. Advanced usage

10.1. Ignore options

By default, the PageBundle decorates all pages. However it is possible to tweak this behavior by ignoring patterns :

  • ignore_route_patterns : based on pattern
  • ignore_routes : based on the route name
  • ignore_uri_patterns : based on the an uri pattern
sonata_page:
    ignore_route_patterns:
        - (.*)admin(.*)   # ignore admin route, ie route containing 'admin'
        - ^_(.*)          # ignore symfony routes

    ignore_routes:
        - sonata_page_cache_esi
        - sonata_page_cache_ssi

    ignore_uri_patterns:
        - ^/admin\/     # ignore admin route, ie route containing 'admin'

10.2. Page default options

It’s possible to redefine settings for autogenerated pages (like command update core routes):

  • page_defaults : defaults for page properties, used in update page routes command
sonata_page:
    page_defaults:
        homepage: {decorate: false} # disable decoration for homepage route_name

Found a typo? Something is wrong in this documentation? Just fork and edit it!