Sonata: Is it possible to assign blocks per page (not by template)?

Viewed 129

I am working on this site using Symfony 2.8.20 and Sonata Page Bundle 3.4, but each page has very specific contents. I have made specific block for each of those contents but that means that in Sonata Page Admin > Composer, when the user chooses the kind of block he wants, the list is extremely long.

I have seen here https://sonata-project.org/bundles/page/master/doc/reference/page_composer.html that it is possible to specify which blocks are available for each template, but is it possible to do the same with pages instead ? Or should I do a template for each page and then assign the blocks ?

Considering all pages have the same basic layout, my first guess would have been to use template inheritance, but I have not managed to make it work.

0 Answers
Related