Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-19 11:16:27 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-19 16:52:23 +0300
commitfa520a2d983b982394ad10088393fb303e48980a (patch)
treef545a33ef8de2eccc6fe781281126a5daf90a4c0 /docs/content/en/templates
parent82029c1ec975bc2173bd5a454aee6c800924035d (diff)
Add Page.GetTerms
Fixes #6905
Diffstat (limited to 'docs/content/en/templates')
-rw-r--r--docs/content/en/templates/taxonomy-templates.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/content/en/templates/taxonomy-templates.md b/docs/content/en/templates/taxonomy-templates.md
index b82a5175c..bef2d3226 100644
--- a/docs/content/en/templates/taxonomy-templates.md
+++ b/docs/content/en/templates/taxonomy-templates.md
@@ -216,6 +216,18 @@ Because we are leveraging the front matter system to define taxonomies for conte
### Example: List Tags in a Single Page Template
+{{< new-in "0.65.0" >}}
+
+```go-html-template
+<ul>
+ {{ range (.GetTerms "tags") }}
+ <li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
+ {{ end }}
+</ul>
+```
+
+Before Hugo 0.65.0 you needed to do something like this:
+
```go-html-template
{{ $taxo := "tags" }} <!-- Use the plural form here -->
<ul id="{{ $taxo }}">