Page
Returns the Page object of the given page.
- Syntax
- PAGE.Page
- Returns
- page.Page
This is a convenience method, useful within partial templates that are called from both shortcode and other template types.
layouts/_shortcodes/foo.html
{{ partial "my-partial.html" . }}When the shortcode template calls the partial template, it passes the current context (the dot). The context includes identifiers such as Page, Params, Inner, and Name.
layouts/page.html
{{ partial "my-partial.html" . }}When the page template calls the partial template, it also passes the current context (the dot). But in this case, the dot is the Page object.
layouts/_partials/my-partial.html
The page title is: {{ .Page.Title }}To handle both scenarios, the partial template must be able to access the Page object with Page.Page.
Last updated:
November 8, 2026
:
content: Remove categories from front matter (1cc1dd83a)
Improve this page