diff --git a/hdbt.theme b/hdbt.theme index 0166f06b6..42e3cab6b 100644 --- a/hdbt.theme +++ b/hdbt.theme @@ -917,6 +917,12 @@ function hdbt_preprocess_paragraph__unit_contact_card(array &$variables) : void return; } + // Collect cache tags from tpr_unit entity. + $variables['#cache']['tags'] = Cache::mergeTags( + $unit->getCacheTags(), + $variables['#cache']['tags'] ?? [] + ); + $unit_translation = $unit->getTranslation($langcode); $variables['unit_contact_card'] = [];