I’ve a view which returns rows of entities. Every entity has a number of multi-value fields.
Drupal Development construction is kinda like this:
-
Area 1:
- Merchandise A
- Merchandise B
- Merchandise C
- …
- Merchandise H
-
Area 2:
- Merchandise A
- Merchandise B
- Merchandise C
Area 2 holds values which can be associated to Area 1 Merchandise B. When displaying Area 1 in Drupal Development Service view outcomes I might like to have the ability to show them like:
Area 1: Merchandise A, Merchandise B (Area 2 Merchandise A, Area 2 Merchandise B), Merchandise C, Merchandise D
As a result of its a multi worth discipline Views is utilizing Drupal Development Service item_list template. My plan was that I’d provides some conditionals to this template in order that if Area 1 Merchandise B was to be proven, I’d use Twig Tweak so as to add Drupal Development Service values from Area 2 inline to it. Drupal Development solely drawback is that to try this I would like Drupal Development Service row’s entity ID. For Drupal Development Service lifetime of me, I can not work out methods to cross this data into Drupal Development Service item_list template. This template appears fully faraway from Drupal Development Service view and would not have a method to reference it.
I have been attempting varied capabilities in my theme file to get Drupal Development Service outcome row NID and cross it alongside as a variable into Drupal Development Service list_item template, however have had nothing however failure. I’ve found out methods to get a customized variable into Drupal Development Service item_list template preprocess_item_list, however I can not work out methods to get Drupal Development Service row NID into this perform.
Any assist can be appreciated.