Parent entity ID is not presented to the view when used in a view

Created on 27 January 2023, almost 2 years ago
Updated 15 April 2024, 7 months ago

Problem/Motivation

Using a Views Reference Field in a content type alongside Paragraphs fields could allow to generate highly customizable displays (teaser etc.).

Steps to reproduce

For example, say I have an Article content type with a Paragraphs field.

This paragraph field allows 3 Paragraphs entity types :

  • Image Paragraphs
  • Text Paragraphs
  • "useful information" Paragraphs

These 3 Paragraphs types can be mixed in number and order (image + texte + image + useful information or text + useful information + image)

Now if I want to customize the teaser display in order to show only the first available image followed by the first text trimmed, I can create two views, one getting the first available image, the second the first text trimmed.

I then add two Views Reference fields to the Article content type.

Such Views Reference fields can access the other Article fields only when the node is the main content. If the node is to be retrieved in a view, the Views Reference fields lose the link.

Proposed resolution

Iā€™m not sure if this use would be or not out of scope for the Views Reference Field module, or if there is already a better solution with other modules.

šŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

šŸ‡«šŸ‡·France Zigazou

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024