Debian Codegraph @

docs/content/en/methods/page/Eq.md

raw
1 ---
2 title: Eq
3 description: Reports whether two Page objects are equal.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: bool
9 signatures: [PAGE1.Eq PAGE2]
10 ---
11
12 In this contrived example we list all pages in the current section except for the current page.
13
14 ```go-html-template {file="layouts/page.html"}
15 {{ $currentPage := . }}
16 {{ range .CurrentSection.Pages }}
17 {{ if not (.Eq $currentPage) }}
18 <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
19 {{ end }}
20 {{ end }}
21 ```