0

We have a block (block_description) that is some text that we want to be displayed on all the content type except the article content type. However, there is a requirement now to display the block on just one of the article content types.

How can this be done with the following settings below on the block?

Current settings (e.g. admin/structure/block/manage/block_description):

  1. Content type: Basic Page (allowed)
  2. Other facet: default values
  3. Content Types: Not restricted
  4. Pages: No restrictions
  5. Roles: no restrictions

Goal:

  • Add block_description to just article-1 (a single Article content type page)
1

With Drupal 8 you can have multiple instances of a block. So, the easiest way to have this block show on the article page would be to do the following:

In the structure->block layout page, go to the region you already have the block created.

Place a new block and select your description block again.

In the configuration settings, set the page restrictions to use: /node/<nid> where is the article you want the block to be displayed. You can use aliases here but the nid is best because this supports alternate languages if you need them.

Note: I assume you already have a block instance set up limited to the other content types. If not, repeat and use the content types restriction to limit it.

  • that is a simple way to do it and it works! – usernameabc Feb 12 '18 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.