Page and Page Templates
Not a Developer? We recommend using Studio, our no-code editor.
Determines where in the Page Template the dynamic content of the Page itself will sit:
Note though that the Page is actually rendered by the server before the Page Template, this allows Liquid to pass data from the Page to the Page Template either using Page Metadata or the content_for
and yield
tags.
{{context.page.metadata}}
- outputs the metadata of the page, though meta fields are usually automatically outputted for you inside "constants"
{{context.page.metadata.name}}
- outputs the Name field of the page
If using CLI, check Page Templates with Siteglide-CLI for details on Page Template only Liquid which is hidden on the Siteglide Admin.
If using CLI, Pages with CLI for details on Page only Liquid which is hidden on the Siteglide Admin.
Browse the rest of the documentation to find dynamic Liquid features you can insert into your Pages and Page Templates using Liquid tags. Almost any Liquid is suitable for outputting in either.
For the full documentation on the platformOS context
variable, see here: https://documentation.platformos.com/developer-guide/variables/context-variable#displaying-the-context-object
{{context}}
- outputs the full extent of site data available by default on this current file
{{context.location.pathname}}
- outputs the full url path such as "/first-part/second-part"
{{context.params.slug}}
- outputs the first part of your url path such as "/first-part"
{{context.params.slug2}}
- outputs the second part of your url path such as "/second-part"
{{context.params.myparam}}
- outputs the value of ?myparam=true
{{context.exports.webapp_1.data.result.items[0].name}}
- Access data that has been fetched using a query earlier in the Page
This takes the URL path of the page, splits it based on / and titleizes the items.