Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
1.5
-
Flagged
-
Quasar
-
Puma Sprint 252, Puma Sprint 253, Puma Sprint 254
Description
In a set up using content blocks (nested even), the PMA output shows no distinction between the various block types, because this information is only present as jcr:primaryType which is not output.
E.g., with this content:
/content/documents/myproject/content/sample-document/sample-document: jcr:primaryType: myproject:contentdocument /myproject:flexcompound[1]: jcr:primaryType: myproject:flexcompound /myproject:webcomponent: jcr:primaryType: myproject:titlecompound myproject:title: "My Title" /myproject:flexcompound[2]: jcr:primaryType: myproject:flexcompound /myproject:webcomponent: jcr:primaryType: myproject:paragraphcompound /myproject:html: jcr:primaryType: hippostd:html hippostd:content: <p>My HTML</p>
the content part of the PMA is this:
"content": { "u64ab46480c2040d29f18d7a394f0334b": "name": "sample-document", "displayName": "Sample document", "flexcompound": [ { "name": "myproject:flexcompound", "displayName": "myproject:flexcompound", "webcomponents": [ { "name": "myproject:webcomponent", "displayName": "myproject:webcomponent", "title": "My Title" } ] }, { "name": "myproject:flexcompound", "displayName": "myproject:flexcompound", "webcomponents": [ { "name": "myproject:webcomponent", "displayName": "myproject:webcomponent", "html": { "value": "<p>My HTML</p>" } } ] } ], } } }
This output makes it hard for a SPA to render he various parts differently, i.e. to map compounds to front-end components.
A workaround is to add a "type" field to the compound definition and not render it in Wicket editor. But it will probably show in the side editor in the Experience Manager.