Skip to content

Commit

Permalink
Update block--video-hero-unit.html.twig
Browse files Browse the repository at this point in the history
Updated video hero unit unique ID
  • Loading branch information
jnicholCU committed Aug 26, 2024
1 parent ef46c80 commit 911349a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/block/block--video-hero-unit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'block-hero-unit',
'ucb-hero-outer-wrapper'
] %}
{% set blockId = content['#block_content'].id() %}
{% set blockId = 'ucb_hero_unit_video_player'|clean_unique_id %}

{# set style for backgroung settings #}
{% if content['#block_content'].field_solid_colors.value is defined %}
Expand Down Expand Up @@ -79,7 +79,7 @@
{% if videoURL is defined %}
<div hidden class="ucb-hero-unit-video-wrapper">
<div class="hero-unit-video-overlay"></div>
<div class="ucb-hero-unit-video-player-wrapper" id="ucb_hero_unit_video_player_{{ blockId }}"></div>
<div class="ucb-hero-unit-video-player-wrapper" id="{{ blockId }}"></div>
<div class="ucb-hero-unit-video-controls-wrapper">
<div class="ucb-hero-unit-video-controls">
<span class="ucb-hero-unit-video-control-button ucb-hero-unit-video-play-pause" title="Play/Pause video">
Expand All @@ -89,7 +89,7 @@
</div>
</div>
<script type="text/javascript">
window.addEventListener('load', () => enableVideoHero('{{ videoURL }}', 'ucb_hero_unit_video_player_{{ blockId }}'));
window.addEventListener('load', () => enableVideoHero('{{ videoURL }}', '{{ blockId }}'));
</script>
{% endif %}
{% set linkColor = content['#block_content'].field_link_color.value %}
Expand Down

0 comments on commit 911349a

Please sign in to comment.