diff --git a/hdbt.theme b/hdbt.theme index 71abc68e2..958ceb281 100644 --- a/hdbt.theme +++ b/hdbt.theme @@ -1700,13 +1700,6 @@ function hdbt_preprocess_paragraph__event_list(&$variables): void { $variables['#attached']['drupalSettings']['helfi_events']['baseUrl'] = LinkedEvents::BASE_URL; } -/** - * Implements hook_preprocess_HOOK(). - */ -function hdbt_preprocess_paragraph__curated_event_list(array &$variables): void { - $variables['content']['#title'] = t('Recommended events', [], ['context' => 'Curated event list title']); -} - /** * Implements hook_preprocess_HOOK(). */ diff --git a/templates/paragraphs/paragraph--curated-event-list.html.twig b/templates/paragraphs/paragraph--curated-event-list.html.twig index 9a73a20fa..0b2bb44d2 100644 --- a/templates/paragraphs/paragraph--curated-event-list.html.twig +++ b/templates/paragraphs/paragraph--curated-event-list.html.twig @@ -6,7 +6,7 @@ 'component--curated-event-list', ], component_title_level: 'h2', - component_title: content['#title'], + component_title: 'Recommended events'|trans({}, {'context': 'Curated event list title'}), } %} {% block component_content %}