In Drupal 8, how can I get all pages of a custom content type "MyPage" to be displayed using a custom view "MyView"?

2 Answers 2

  1. Structure -> Views -> Add a view (`/admin/structure/views/add')
  2. View Settings: Show Content of type MyPage.

I suggest reading the Views documentation.

  • Thank you. I have read that documentation, and watched numerous tutorials, but I find the details of the Views module extremely difficult to grasp. My "MyPage" pages still appear the same after using your procedure to apply my "MyView" custom view, so I have asked a further question which is directed at what I'm actually trying to achive.
    – Nick Hope
    Dec 6, 2017 at 13:32
  • When you create a view as I described, it does not change how nodes (pages) of the content type are displayed; instead, it creates a new page that lists all the nodes (pages) of that content type. Dec 6, 2017 at 13:34
  • Understood, and I was able to do that previously by checking "Create a page" when I added the view. But I wish to assign a custom view to all nodes (pages) of a custom content type, not just create a single new page.
    – Nick Hope
    Dec 6, 2017 at 13:42
  • You can create multiple pages from the "Page" screen; you need to put a wildcard in the path and use arguments. But it's probably easier to use Panels if that's what you want to do. Dec 6, 2017 at 13:50
  • 1
    You can create a views block and add the block to existing pages of your liking by using the available restrictions within the block settings. Dec 6, 2017 at 15:59

1) Go to Structure -> Views -> Add a view (`/admin/structure/views/add')
2) In filter criteria select Content:content type (= MyPage)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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