Skip to content

Commit

Permalink
Move component title to template
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremysteerio committed Oct 21, 2024
1 parent 5071dbb commit 8223af7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 0 additions & 7 deletions hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -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().
*/
Expand Down
2 changes: 2 additions & 0 deletions templates/paragraphs/paragraph--curated-event-list.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% set component_title = 'Recommended events'|trans({}, {'context': 'Curated event list title'}) %}

{% block paragraph %}
{% embed "@hdbt/misc/component.twig" with
{
Expand Down

0 comments on commit 8223af7

Please sign in to comment.