Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit 89a75d9

Browse files
authored
Add support for overriding sponsor URL at event level (#399)
This allows for events to put in a specific URL for their sponsor, for event-level tracking. Signed-off-by: Matt Stratton <matt.stratton@gmail.com>
1 parent 4c43a5d commit 89a75d9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

layouts/partials/sponsors.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ <h4 class="sponsor-cta">{{ $level.label }} Sponsors</h4>
3333

3434
{{ if isset $.Site.Data.sponsors .id }}
3535

36+
{{ if .url }}
37+
{{ $.Scratch.Set "SponsorURL" .url }}
38+
{{ else }}
39+
{{ $.Scratch.Set "SponsorURL" $s.url }}
40+
{{ end }}
41+
3642
<div class = "col-lg-1 col-md-2 col-4">
37-
<a href = "{{ $s.url }}"><img src = "/img/sponsors/{{ .id }}.png" alt = "{{ $s.name }}" title = "{{ $s.name }}" class="img-fluid"></a>
43+
<a href = "{{ $.Scratch.Get "SponsorURL" }}"><img src = "/img/sponsors/{{ .id }}.png" alt = "{{ $s.name }}" title = "{{ $s.name }}" class="img-fluid"></a>
3844
</div>{{ "<!-- close individual sponsor div-->" | safeHTML}}
3945
{{- end -}}
4046
{{- end -}}

0 commit comments

Comments
 (0)