diff --git a/data/call_to_actions/lid-worden.yaml b/data/call_to_actions/lid-worden.yaml new file mode 100644 index 0000000..ac859bf --- /dev/null +++ b/data/call_to_actions/lid-worden.yaml @@ -0,0 +1,9 @@ +id: lid-worden +items: + - item: en + language: en + text: Become a member! + - item: nl + language: nl + text: Word lid! + page: "lidmaatschap/aanmelden/index.md" diff --git a/themes/nluug/layouts/shortcodes/insert-cta.html b/themes/nluug/layouts/shortcodes/insert-cta.html new file mode 100644 index 0000000..e661b69 --- /dev/null +++ b/themes/nluug/layouts/shortcodes/insert-cta.html @@ -0,0 +1,16 @@ +{{ $context := . }} +{{ $id := .Get "id" }} +{{ with (index $.Site.Data.call_to_actions $id) }} +{{ $language := $.Site.Language.Lang }} +
+ {{ $string := "Tekst" }} + {{- range $key, $value := .items -}} + {{ if eq $value.language $language }} + {{ $string = $value.text }} + {{ if .page }}{{ end }} + {{ $string }} + {{ if .page }}{{ end }} + {{ end }} + {{ end }} +
+{{ end }}