By default, the PageBundle
decorates all pages. However it is possible to
tweak this behavior by ignoring patterns :
ignore_route_patterns
: based on patternignore_routes
: based on the route nameignore_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_esi_cache
- sonata_page_js_cache
ignore_uri_patterns:
- ^/admin(.*) # ignore admin route, ie route containing 'admin'
It’s possible to redefine settings for autogenerated pages (like command update core routes):
page_defaults
: defaults for page properties, used in update pageroutes command
sonata_page:
page_defaults:
homepage: {decorate: false} # disable decoration for homepage route_name
You can configure the Twig Recorder
with the following configuration:
twig:
base_template_class: Sonata\PageBundle\Twig\TwigTemplate13
base_template_class: Sonata\PageBundle\Twig\TwigTemplate14
// todo add more information
Found a typo? Something is wrong in this documentation? Just fork and edit it!