I have pages being published using DXA Page Templates and include CPs added to the page directly (again, using standard DXA CTs).
I want to get the Component Presentations from a Page, in the order the editor places them on (with the Pagecontent nodes), in the order the editor places them on the Page (optionally within regions) - ideally in a single GraphQL query.
{
"data": {
"page": { "itemId": 730, "title": "XO Home",
"containerItems": [
{
"component": { "itemId": 485 } },
{ "component": { "itemId": 485544 } },
{ "component": { "itemId": 600 } },
{ "component": { "itemId": 868 } }
]
...
"component" "data": {
"itemId": 544 } "Id": "485-650",
} "Namespace": "tcm",
"ComponentTemplate": {...,
"component" "Folder": {
"itemId" "Id": 600"130",
} "Title": "Products"
},
"Content": {
"component": { "itemId" "headline": 868"Content }headline",
}
]
"introduction": "Content }introduction",
}
} "body": {...
{
page(namespaceId: 1, publicationId: 7, pageId: 730) {
itemId
pageTemplate {
id
}
title
url
content {
... on UntypedContent {
data
type
}
}
}
}
...
{
"$type": "EmbeddedRegion",
"components": [
{
"$type": "Link",
"id": "tcm:7-868",
"title": "2020-09-03_08:20:49-my campaign-Sample Offering""..."
},
{
"$type": "Link",
"id": "tcm:7-485",
"title": "LightSolar RI Offering""..."
},
{
"$type": "Link",
"id": "tcm:7-600",
"title": "LightSolar CII Offering""..."
},
{
"$type": "Link",
"id": "tcm:7-544",
"title": "LightSolar CI Offering""..."
}
],
...