summaryrefslogtreecommitdiff
path: root/layouts/partials/reviews/related.html
blob: 6432331437e56e48850e5d3271d4b0b9efcec448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{{ $page := .}}
{{ $reviews := where .Site.RegularPages "Section" "eq" "reviews" }}
<aside class="related">
  <ul>
    {{ range .Page.Params.related }}
    {{ $related := slice .}}
    <li class="related-item"><b>{{ . }}</b>
      <ol class="related-titles">
        {{- range (where $reviews ".Params.related" "intersect" $related)   }}
        <li>
          {{ if (eq . $page) }}
          {{ .Params.relatedName}}
          {{ else }}
          <a href="{{.Permalink}}"> {{ .Params.relatedName }} </a>
          {{ end }}
        </li>

        {{ end }}
  </ul>
</li>
{{ end }}
</ul>
</aside>