mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user