Closed fmontes closed 8 months ago
Currently the data that the editor needs from the client looks like this:
{
"action": "CUSTOMER_ACTIONS.SET_CONTENTLET",
"payload": {
"x": "100",
"y": "200",
"width": "300",
"height": "400",
"container": {
"acceptTypes": "blog,news,article",
"identifier": "identifier-123",
"contentletsId": ["contentlet-123", "contentlet-456"],
"maxContentlets": 20,
"uuid": "uuid-123"
},
"contentlet": {
"identifier": "contentlet-123",
"title": "My Contentlet",
"inode": "contentlet-456"
},
"pageContainers": [
{
"identifier": "//demo.dotcms.com/application/containers/default/",
"uuid": "10",
"contentletsId": ["contentlet-123", "contentlet-456"]
},
{
"identifier": "//demo.dotcms.com/application/containers/default/",
"uuid": "1",
"contentletsId": ["contentlet-789", "contentlet-000"]
}
],
"pageId": "page.indentifier",
"personaTag": "page.viewAs.persona.keyTag",
"language_id": "page.viewAs.language_id"
}
}
In the HTML of the VTL:
✅ We have
payload.container.acceptTypes
payload.container.identifier
payload.container.maxContentlets
payload.container.uuid
payload.contentlet.identifier
payload.contentlet.title
payload.contentlet.inode
❌ We missing
payload.container.contentletsId
payload.pageContainers
payload.pageId
payload.personaTag
payload.language_id
[!NOTE]
We can calculate the missing HTML from the API response in the SDK using the same response available in the editor.
We need to get the missing data in the editor and not passing it from the client.
The editor will pass the contentlet and container and with that we can go a fish from the rest of the data in the store where we have the page api response.
Parent
27546
Task Description
As a dotCMS developer, I need to research if the page API provides all the necessary information about the containers within contentlets in the HTML, specifically in the
page.render
property.This research is essential to determine if we can use the current API to edit velocity pages in the new edit page as is or if we need to develop a new endpoint.
External Links
N/A
Assumptions & Initiation Needs