1

I have a content type called "Slideshow" where users can create any number of "slideshow" nodes. This content type has a field called "Slide" which is a field collection of other fields (caption, image, description, and link). The user can add multiple "Slides" to each "Slideshow" node (I can achieve this with the help of either PARAGRAPHS or FIELD COLLECTION modules).

Then I use VIEWS to create Blocks of the "Slideshow" content type to display specific nodes using contextual filter Nid.

MY PROBLEM IS: In VIEWS I can only list "title" and "slide" fields (as rendered) of the "slideshow" content type, whereas I need to list the fields inside the "Slide" field (the caption, image, description and link) so that I can customize them using VIEWS. Is there any way to achieve this? (allowing VIEWS to access the fields of PARAGRAPHS module).

POSSIBLE SOLUTIONS: In VIEWS I added a relationship "Slide", this allowed me to list the fields inside "Slide" field. the problem is that I'm trying to avoid relationships as it uses a lot of LEFT JOINS and this may decrease performance. my website uses lots of these slideshows and galleries multiple time in the same page and I don't want to lose performance.

Any help will be much appreciated.

0

1 Answer 1

1

In D8 your View's are automatically cached; thus, your query is results are cached, so I wouldn't worry too much about this. Nonetheless, you can enable Show performance statistics in views settings (/admin/structure/views/settings), to see how long it takes.

Testing with 1 field, the View Render Time is ~1.20ms faster when you create a View of Show: Field Collection Item and then add relationship to node rather than a View of Show: Content with a relationship of field collection.

Your Answer

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

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