diff options
Diffstat (limited to 'docs/content/en/methods/page/Data.md')
-rw-r--r-- | docs/content/en/methods/page/Data.md | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/docs/content/en/methods/page/Data.md b/docs/content/en/methods/page/Data.md index b3df243c5..ae0bdc57f 100644 --- a/docs/content/en/methods/page/Data.md +++ b/docs/content/en/methods/page/Data.md @@ -3,24 +3,18 @@ title: Data description: Returns a unique data object for each page kind. categories: [] keywords: [] -action: - related: [] - returnType: page.Data - signatures: [PAGE.Data] -toc: true +params: + functions_and_methods: + returnType: page.Data + signatures: [PAGE.Data] --- 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](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/ -{{% /note %}} +> [!note] +> 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`] The examples that follow are based on this site configuration: @@ -67,11 +61,8 @@ Terms {{ $taxonomyObject := .Data.Terms }} ``` -{{% note %}} -Once you have captured the `Taxonomy` object, use any of the [taxonomy methods] to sort, count, or capture a subset of its weighted pages. - -[taxonomy methods]: /methods/taxonomy/ -{{% /note %}} +> [!note] +> Once you have captured the `Taxonomy` object, use any of the [taxonomy methods] to sort, count, or capture a subset of its weighted pages. Learn more about [taxonomy templates]. @@ -102,5 +93,9 @@ Term Learn more about [term templates]. +[`Pages`]: /methods/page/pages/ +[`RegularPages`]: /methods/page/regularpages/ +[`RegularPagesRecursive`]: /methods/page/regularpagesrecursive/ +[taxonomy methods]: /methods/taxonomy/ [taxonomy templates]: /templates/types/#taxonomy [term templates]: /templates/types/#term |