Hi,
I’m struggling to find the correct syntax for what I want to do.
Like a “Read more articles” section, I want to exclude the active current page from a list of pages.
I have a “translationKey” in my .md files (pages), so I was planning to use that to do the comparison, which may not be the best way, but works for me (I’m all ears of you have a better way to do that)
{{ $section := site.GetPage "references" }}
<ul class="references">
{{ range $section.Pages | first 3 | slice [need help here] }}
<li class="reference">
<div class="reference__img">
<img src="{{ .Params.img }}" alt=""/>
</div>
<p class="reference__description">{{ .Description | safeHTML }}</p>
</li>
{{ end }}
</ul>
Despite reading the docs I can’t get the right syntax.
Thank you for your help.
I like your solution more, thanks !