I am using the Paragraphs module and I want to show the paragraphs of one type at the beginning of the view and the paragraph of a different type at the end. How do I distinguish paragraphs of different types (since the field name is the same)?

I see that they are doing it here but my view doesn't have those options : https://www.drupal.org/node/2592021

ALSO I want to be able to insert this view of paragraphs into a view of the corresponding content. How can I do that?

  • Is your base view of Paragraphs, or Node? Might explain why some options are missing.
    – Kevin
    Jan 11 '17 at 19:44
  • @Diana did you try my answer?
    – No Sssweat
    Jan 12 '17 at 2:28

You need to create a brand new view. Go to /admin/structure/views/add

For Show: select Paragraph Items

Once in the View, add fields, and you should be able to add Paragraphs item: [Name]

but I want to see the content that has these paragraphs, not just the paragraphs

Then you will need to use Views Fields View to embed this view as a field in your other (node) view.

You will need to add a contextual filter of nid (to this paragraphs view).

Now in our other view (Node view) add views embed view as a field.

I think there is an option (checkbox) to automatically pass the contextual filter of your current node view to the embed view.

If not, simply add nid as a field in your node view, then when you add the view embed view field, use the replacement pattern of the nid as contextual filter.

  • but I want to see the content that has these paragraphs, not just the paragraphs
    – Diana
    Dec 28 '16 at 16:14
  • That is what the views field view part is for. 1) Create a view of content that contains paragraphs. 2) One of the fields or that view should be another view that displays paragraph content for each individual node. If you don't have a good grasp on how this works, I recommend looking for a tutorial on the Views Field View module.
    – lukedekker
    Jan 11 '17 at 17:59

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.