How is it possible to place a custom block inside the admin area? (e.g. in a node edit form)? I tried with page restriction but with no success. How can I see the block regions of the admin theme (seven)?
1 Answer
You can just go to "Structure > block layout" from the admin bar. This will default to your current default theme but along the top of that page it will list out all other active themes and "Seven" will be one of them
Click that and the block listing will now be for the Seven theme and you can add/remove blocks like you can normally except it will now be for the Seven theme
You wouldn't be able to place a block midway through the form but you could add a block above/below the form
-
Thanks for your help, but for some reason the "seven" theme is not appearing on top. The only one that is visible, it is the frontend theme Commented Sep 26, 2019 at 18:51
-
1Not sure why that might be, maybe something on your code is messing about with it. This is the url to view the seven blocks /admin/structure/block/list/seven– LeighCommented Sep 27, 2019 at 8:11
hook_form_alter()
, programatically build the view for a block, and add it to the$form
in an appropriate place.