Score:0

How to list content that references another content type through paragraphs

tr flag

I have two content types: "Author" and "Document." The Document content type uses a Paragraph "Author_citation" to connect the two and display all the authors (plus other fields) that worked on that Document in a block. This works fine.

I also want to show a block - on the "Author" page - listing documents connected to that author, through the paragraph.

I know I've seen a way in the past to pull this with views. But I'm not finding the answer.

Jaypan avatar
de flag
If I recall correctly, Paragraphs does not have proper views integration. I don't think that this can be done. But hopefully someone will come along and prove me wrong.
Score:0
tr flag

Whoohoo! I figured it out! Here's a description, using my first Content type ('document') containing a paragraph ('citation') that has an entity reference to a second content type ('author'). While showing all authors on Document is easy, to show all documents connected to that author, do this:

  1. In the view, under Advanced options, create a reference to the paragraph, ie, "field_citation: Paragraph"

  2. Create a second reference, "(field_citation: Paragraph) field_author: Content." Set its reference in the dropdown to the 1st relationship in step one.

  3. Set a contextual filter of ID, and set its relationship to (field_author: Content) Choose 'Provide Default Value: from URL'

That's pretty much it. place the views block on the "authors" page, and it works!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.