Skip to content

Commit 91c15de

Browse files
feat: generate unique dom IDs
1 parent d58a873 commit 91c15de

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

html-templates/events/event.tpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,11 @@
142142

143143
<ol class="list-unstyled">
144144
{foreach item=Segment from=$Event->Segments}
145-
<li class="event-segment my-3" id="{$Segment->StartTime}">
145+
<li class="event-segment my-3" id="{unique_dom_id}{$Segment->Handle}{/unique_dom_id}">
146146
{$thisDate = date("l, F jS", $Segment->StartTime)}
147147

148148
{if $lastDate != $thisDate}
149-
{* TODO: use friendlier but html compliant date ID *}
150-
<h3 class="h5 font-weight-normal" id="{$Segment->StartTime}">
149+
<h3 class="h5 font-weight-normal" id="{date("Y-m-d", $Segment->StartTime)}">
151150
<span class="event-segment__day-of-week">{date("l", $Segment->StartTime)},</span>
152151
{date("F jS", $Segment->StartTime)}
153152
</h3>

0 commit comments

Comments
 (0)