Link to content with 2 front matter variables

We have event content where we can set a ‘series’ front matter.
To define the start/landing page of that series, we have a second front matter ‘start’.

Now i would like to create a link that links to the page with both a particular series and start.
So a link to the landing page of that series.

Is there any way of querying content and getting the url of that page?

Can you give us an example event content front matter with these params?

following event is a landingpage for different events of the “byteweek2019” series.

and here you find the event page.
https://hsbxl.be/events/byteweek/2019
I would like to link the series name to the landing page (itself in this case)

If I am understanding you correctly, you could write a shortcode for this that would grab the series param from front matter, then link to the page by that name.

Example usage:

{{< link "Link Text" >}}

Example definition:

{{ $page := .Page.GetPage .Page.Params.series }}
<a href="{{ $page.Permalink }}">{{ .Get 0 }}</a>

thanks for the hint.
I needed to use it in the layout of an event, so html.
This is how i got it running now:

{{ if isset .Params "series"}}
{{ $series := .Params.series }}
{{ range where .Site.Pages "Params.series" $series }}
    {{ if eq .Params.start "true"}}
        <div>This event is part of series '<strong><a href="{{ .Permalink }}">{{ $series }}</a></strong>'</div>
    {{ end }}
{{ end }}
{{ end }}

Completely off topic, you folks are named like Pokemon. :slight_smile:

@betz -> @zwbetz -> @megabetz!

3 Likes