blob: 4947a4bfa339bf1ac29c31f41bfc738bd43c570d (
plain) (
blame)
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: []
params:
functions_and_methods:
returnType: bool
signatures: [PAGE1.Eq PAGE2]
---
In this contrived example from a single 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 }}
```
|