TransWikia.com

grouped paragraphs by field not filtering to current language

Drupal Answers Asked by turpentyne on October 26, 2021

I have a D8.9 multilingual site. I need to group paragraph elements, as well as filter them by page language and Content ID. But my language filter don’t seem to work.

I have content type "services."
"services" contains a paragraph field, "components" with 3 fields inside.
One of the fields in "components" is a taxonomy reference "types" – this is what I need to group the paragraphs by (sometimes)

I’ve created a View of ‘Services’, placed as a block on any "services" page.
The view has a contextual filter of Content:ID, pulled from URL.
It also has a relationship "field_components: Paragraph" so that I can access the specific paragraph fields.

It also has a filter "Content: Translation language (= Content language selected for page)" – because we have 5 translations of the site. (and translation is set within paragraph fields – not on larger paragraph field within "services" content type)

But when I view the service page, it pulls every single translated version paragraph – despite the translation filter.

Let me know if there are further details needed, and I’ll edit the question accordingly.

One Answer

Might've just found the answer to my own question.. there are TWO places that the language needed to be edited. At bottom of the center column in Views admin, there's another language option for the view itself. I had to set this "Rendering Language" to "Content language selected for page"

Then the other language paragraphs disappeared.

Answered by turpentyne on October 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP