Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is context in Sonata Block Bundle

What does the context means inside the configurations of the Sonata Block Bundle? What is for?

sonata_block:
    default_contexts: [cms]
    blocks:
        sonata.admin.block.admin_list:
            contexts:   [admin]
like image 701
Guillermo Gutiérrez Avatar asked Dec 14 '25 12:12

Guillermo Gutiérrez


1 Answers

Sorry for the delay, a context is used to group a set of blocks. So you can have block related to a CMS context, or to the admin.

So an admin block will be never used in the CMS context.

like image 175
rande Avatar answered Dec 16 '25 23:12

rande



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!