0

Drupal 8

Say I have 1 content type and 2 media types users can create Content type: Post Media Type: Picture Media type: Movie

How can I create a view that pulls all 3? As far as I can see you can only create views that show content, or media but not both in the same view.

I wasnt to create a feed displaying all 3 types of all users on the site.

2
  • Which version of Drupal?
    – CG Monroe
    Jun 24, 2019 at 20:25
  • there is no relationship between the content and media though. I already checked into that once, But if I create a new View to display content and then go to add a relationship, Media is not one of the options. Just to clarify I want to display all published nodes from Content Type: Post, Media Type: Picture, Media Type: Movie. From ALL users on the site. I could do this on an individual users page using relationships as the User has a relationship to all but there is nothing that connects the posts from everyone. Jun 25, 2019 at 14:37

1 Answer 1

0

If there are no relationships among the three entity types, as you have indicated in comments, you could use attachments or blocks. (I'm assuming you want a page that displays all the information.)

Attachment Solution:

  • Create your View with a page display of one of the entity types.
  • In the same View create two attachment displays, and use overrides to base them off the other entity types. Attach them to the page display.

Block Solution:

  • Create your View with a page display of one of the entity types.
  • Create additional, separate, Views of each of the other entity types, with block displays
  • Use the block configuration system to place those blocks on the page display
2
  • While this would work depending on what you want the final output to look like. I want the final output to be a "pinterest" style feed. And neither of these solutions would get me the data in a way where I could make that style feed. I think I will have to have the page custom programmed out to pull from multiple tables in the database. Thank you though, both are very good suggestions Jul 11, 2020 at 3:09
  • No problem. I do recommend that you add this information to your post, along with some details about the three entity types. It will help you get more precisely tailored answers.
    – beltouche
    Jul 11, 2020 at 20:30

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.