21.7. Hide retractable option in block configuration¶
If you want to hide the ‚Retractable‘ option in the block configuration, you don’t need to use CSS or comment out the code, which then in turn requires you to resolve conflicts when you update the code as you are making code changes in the core code. Instead, you can make a change in the database.
Connect to your database.
You can do so via the command line or via a graphical interface, whichever you are more comfortable with.
In the table
`blocktype_config`, add the block type for which you want to remove the retractable option into the plugin field. You can find the block type in the Plugin administration.
In the field add ‚notretractable‘.
In the value add ‚1‘ to indicate ‚Yes‘.
Save your change.
Create a page with the selected block type and check that the configuration screen does not contain the ‚Retractable‘ option, but other block types still do.