1

I am currently a caretaker for a Drupal 7 website and I can't figure out how to group paragraph items in views. I have created a content type Products and one of the fields is called product variation which is field type paragraphs. I have created a paragraph bundle for that field.

Then I created a view to show the products on the front page. To display the paragraph fields I created a content relationship. When I open the relationship option and select delta to display one it only shows one and I can't get data from the others. If I select delta to display all it shows like in the image below (Current view displays like). The goal is shown on the same image. Could someone help me solve this: enter image description here

I am currently a caretaker for a Drupal 7 website and I can't figure out how to group paragraph items in views. I have created a content type Products and one of the fields is called product variation which is field type paragraphs. I have created a paragraph bundle for that field.

Then I created a view to show the products on the front page. To display the paragraph fields I created a content relationship. When I open the relationship option and select delta to display one it only shows one and I can't get data from the others. If I select delta to display all it shows like in the image below (Current view displays like). The goal is shown on the same image. Could someone help me solve this:

My setup on the fields I want to display in the view are setup like this

`content-type: Products
 product name - field type: Node module element
 proudct image - field type: Image
 product variation - field type: paragraph
 paragraph bundle: product variations
                   color (Term reference)

 view:
 Display: product name, product image,product variation
 Relationship: Content: product variation (field_product_variation)`

Hopefully, someone can help me solve this problem.

4
  • Consider adding a new view mode to the node and the paragraphs where you display the fields just like you want. And in the view then display the full node in a certain view mode instead of dragging fields around in the view.
    – leymannx
    Nov 9 at 13:15
  • @leymannx I don't understand what you mean with adding a new view mode. Could you explain little more in detail. Nov 9 at 13:22
  • 1
    You can use Views to display either fields (not so good in the long run) or to simply display full entities in a certain view mode (teaser, full etc.). You can add your own view modes to entities (nodes, paragraphs etc.) for your own purposes so that when they are displayed in whatever context you just get the stuff you want and you can use normal node or paragraphs templates to adjust them. So in your view you probably display the node in a certain view mode (maybe 'my_own_teaser'), while this view mode displays the paragraphs in their own certain view mode (maybe also 'my_own_teaser').
    – leymannx
    Nov 9 at 13:28
  • ok, I will give it a go. Nov 9 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.