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