getPageData(pageSlug)
Function to get page attributes based on its slug
{% set pageData = _Page.getPageData('contact-us')%}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pageSlug | string | yes | Page slug |
Example Response
{
"id" : "7",
"guid" : "dda1e2a8-f9e0-4f20-9cea-e408f33b5d14",
"slug": "contact-us",
"title": "Contact Us",
"content": "Contact Us page contents.",
"meta": {
"title": "meta title",
"keyword": "meta keywords",
"description" : "meta description"
},
"media" : {
"id" : "cloudinary Public Id",
"cloudName" : "cloudinary cloud name",
"path" : "media path"
},
"keywords": "keywords",
"externalLink" : "External Link",
"childPages": [
{
"id" : "8",
"guid" : "8da1e2a8-f9e0-4f20-9cea-e408f33b5d14",
"slug": "melbourne-branch",
"title": "Melbourne Branch",
"content": "Melbourne Branch Address and Other Contact Us page contents.",
"meta": {
"title": "meta title",
"keyword": "meta keywords",
"description" : "meta description"
},
"media" : {
"id" : "cloudinary Public Id",
"cloudName" : "cloudinary cloud name",
"path" : "media path"
},
"keywords": "keywords",
"externalLink" : "External Link",
},
{
"id" : "9",
"guid" : "9da1e2a8-f9e0-4f20-9cea-e408f33b5d14",
"slug": "adelaide-branch",
"title": "Adelaide Branch",
"content": "Adelaide Branch Address and Other Contact Us page contents.",
"meta": {
"title": "meta title",
"keyword": "meta keywords",
"description" : "meta description"
},
"media" : {
"id" : "cloudinary Public Id",
"cloudName" : "cloudinary cloud name",
"path" : "media path"
},
"keywords": "keywords",
"externalLink" : "External Link",
}
]
}
Response Description
| Attribute | Description |
|---|---|
| id | Page ID |
| guid | Page GUID |
| slug | Page slug |
| title | Page title |
| content | Page content |
| meta_title | Page meta title |
| meta_keyword | Page meta keywords |
| meta_description | Page description |
| keywords | Page keywords |
| childPages | An array of child pages with attributes similar to parent page |
Updated about 8 years ago
