1

I created two content types: articles and press releases and I want to display those in the same page. I also am developing a custom theme.

So I created a view for that with the machine name press_release_list, created a template for it: views-view--press-release-list.html.twig and it works perfectly.

The problem is, I cannot make use of regions. I mean, I have content and side_menu regions and I want to add a twitter feed to the side menu. I add the block through "block layout" menu, it can be configured to be displayed on article and press release nodes however there is no option for the view I created...

I'm quite new to Drupal so what would be the best way to do this, is there a way to display the block on the view or is there a better option than creating a view?

0

In block layout the visibility for content types works only, if the content type is a route match. That means, you have requested a node with that specific content type through the url.

It does not work for nodes that are displayed as result of a view.

To configure the visibility for a view you can define in the tab "Pages" the url of the view or a pattern of urls, that matches multiple views.

3
  • I tried that actualy, it's not working. In the page settings for the view the path is set to /what-is-on-the-agenda and in the block's configuration pages tab url set to /what-is-on-the-agenda with "show for the listed pages" option selected. Cleared the caches too... Am I missing smt.? – madpoet Aug 3 '16 at 18:24
  • did you remove all other restriction, especially that for content types? – 4k4 Aug 3 '16 at 19:09
  • Yep that seems to be the problem, removed the content type restrictions and it's fine now. – madpoet Aug 4 '16 at 6:26

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.