is there a way to add views block to add/edit content pages? I have two content types and one of them has Taxonomy term baste with unique terms (one term per node), when creating new node I want to have block with unused terms. I tried to accomplish this using Markup module but no success, and Display suite and Panels didn't worked.
1 Answer
Here's how to display a block on node add/edit pages in Drupal 8:
Go to Structure -> Blocks
. Select the block layout page for the theme you use to add/edit nodes. This is usually the admin theme, but it may also be the standard theme for your site if you want to display the block to non-admin users. If you want to show the block to both admin and non-admin users, you may need to configure the block settings (as described below) for both the admin theme and the standard theme.
On the block layout page, click Edit on the block you want to display.
Under Visibility, click Pages.
In the text field, enter:
/node/add/*
/node/*/edit
For Drupal 7, don't use the first slash:
node/add/*
node/*/edit
The *
is a wildcard that says "any content/value can go here."
Then check the radio button for Show for the listed pages.
If you also want to limit the block to only show for certain content types, you can use the Content types option above Pages.
-
2Might be worth mentioning that you need to do this on the blocks page for the admin theme (most people use admin theme for node add/edit and the block layout defaults to the front end theme)– Clive ♦Dec 7, 2017 at 9:12
-
-
@PatrickKenny Thank You very very very much, I have created so may sites in Drupal, and never felt so dumb about "problem" like this. This is so simple and clean solution. Thank you once again.– knjigorDec 7, 2017 at 9:36