GetTerms
Returns a collection of term pages for terms defined on the given page in the given taxonomy, ordered according to the sequence in which they appear in front matter.
- Syntax
- PAGE.GetTerms TAXONOMY
- Returns
- page.Pages
Given this front matter:
---
tags:
- historical
- classic
- fiction
title: Les Misérables
---+++
tags = ['historical', 'classic', 'fiction']
title = 'Les Misérables'
+++{
"tags": [
"historical",
"classic",
"fiction"
],
"title": "Les Misérables"
}
This template code:
{{ with .GetTerms "tags" }}
<p>Tags</p>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
</ul>
{{ end }}Is rendered to:
<p>Tags</p>
<ul>
<li><a href="/tags/historical/">historical</a></li>
<li><a href="/tags/classic/">classic</a></li>
<li><a href="/tags/fiction/">fiction</a></li>
</ul>Last updated:
April 10, 2025
:
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65' (283e97783)
Improve this page