Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'

This commit is contained in:
Bjørn Erik Pedersen
2025-01-23 09:47:46 +01:00
384 changed files with 3305 additions and 3271 deletions

View File

@@ -10,20 +10,16 @@ action:
toc: true
---
The `Data` method on a `Page` object returns a unique data object for each [page kind].
[page kind]: /getting-started/glossary/#page-kind
The `Data` method on a `Page` object returns a unique data object for each [page kind](g).
{{% note %}}
The `Data` method is only useful within [taxonomy] and [term] templates.
The `Data` method is only useful within [taxonomy](g) and [term](g) templates.
Themes that are not actively maintained may still use `.Data.Pages` in list templates. Although that syntax remains functional, use one of these methods instead: [`Pages`], [`RegularPages`], or [`RegularPagesRecursive`]
[`Pages`]: /methods/page/pages/
[`RegularPages`]: /methods/page/regularpages/
[`RegularPagesRecursive`]: /methods/page/regularpagesrecursive/
[term]: /getting-started/glossary/#term
[taxonomy]: /getting-started/glossary/#taxonomy
{{% /note %}}
The examples that follow are based on this site configuration:
@@ -65,7 +61,7 @@ Plural
```
Terms
: (`page.Taxonomy`) Returns the `Taxonomy` object, consisting of a map of terms and the [weighted pages] associated with each term.
: (`page.Taxonomy`) Returns the `Taxonomy` object, consisting of a map of terms and the [weighted pages](g) associated with each term.
```go-html-template
{{ $taxonomyObject := .Data.Terms }}
@@ -108,4 +104,3 @@ Learn more about [term templates].
[taxonomy templates]: /templates/types/#taxonomy
[term templates]: /templates/types/#term
[weighted pages]: /getting-started/glossary/#weighted-page