Skip to content
Snippets Groups Projects
Commit 2578d384 authored by alexisben's avatar alexisben
Browse files

fix block partners: handle with_link option

parent 9157b308
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
{{- with .block.data -}}
{{- $layout := .layout -}}
{{- $with_link := .with_link -}}
{{- if $layout -}}
{{- $layout_class = printf "block-partners--%s" $layout -}}
......@@ -38,6 +39,7 @@
{{- partial (printf "blocks/templates/partners/%s.html" $layout) (dict
"partners" .partners
"logo_index" $logo_index
"with_link" $with_link
) }}
</div>
</div>
......@@ -51,7 +53,7 @@
{{ if .title }}
{{ $title = partial "PrepareHTML" .title -}}
<h3>
{{- if .url }}
{{- if and .url .with_link }}
<a href="{{ .url }}" {{ if .external }} target="_blank" rel="noopener" {{ end }} title="{{ safeHTML (i18n "commons.link.blank_aria" (dict "Title" $title)) }}">
{{ end -}}
{{- $title -}}
......
{{ $logo_index := .logo_index }}
{{ $with_link := .with_link }}
<div class="grid organizations">
{{- range .partners }}
......@@ -8,6 +9,7 @@
"title" .Title
"url" .Permalink
"logo" (index .Params $logo_index)
"with_link" $with_link
)}}
{{ end }}
{{ else }}
......@@ -16,6 +18,7 @@
"url" .url
"external" true
"logo" .logo
"with_link" $with_link
)}}
{{ end }}
{{ end -}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment