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.

View of the database table in a graphical interface to show the value needed

  1. Connect to your database.

    Bemerkung

    You can do so via the command line or via a graphical interface, whichever you are more comfortable with.

  2. 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.

  3. In the field add ‚notretractable‘.

  4. In the value add ‚1‘ to indicate ‚Yes‘.

  5. Save your change.

  6. 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.