Hi,
The purpose is in the title.
it has to : use items of an parameters to get a page context, and make a link to that page with its title as the title.
In a page I would use [{{<ref “page_title”>}}]({{<ref “page_title”>}})
but it’s different in a partial.
I can’t write that.
I started with:
{{with .Page.Params.Requirements}}
<section id=“requirements_list”>
<span>Read first:
<p>
{{ range . }}
{{ ref “{{.}}” }}{{ .Title }}{{ end }}
{{ end }}
</p>
</section>
{{ end }}
but from there I have no clue, and it’s stupidly complicated, for no reason. Once I know the equivalent of {{}} (and how to use it !!), I’ll write the link part just fine.
+++
title = 'Test'
date = 2022-11-03T12:39:15-07:00
draft = false
requirements = ['/requirements/dependencies','/requirements/operating-system']
+++
layouts/partials/requirements-list.html
{{ with .Params.requirements }}
{{ range . }}
{{ with site.GetPage . }}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ else }}
{{ errorf "Unable to get page %q" . }}
{{ end }}
{{ end }}
{{ end }}