Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Platform 216 - Finish SSO!
Description
A document which is defined as a compound type can be used by a document as a content blocks object by linking the compund type to ContentBlocksFieldPlugin in the cms type editor.
For example, SampleCompound is a compound document type;
/SampleCompound: jcr:primaryType: hipposysedit:templatetype jcr:mixinTypes: ['editor:editable', 'mix:referenceable'] /hipposysedit:nodetype: jcr:primaryType: hippo:handle jcr:mixinTypes: ['mix:referenceable'] /hipposysedit:nodetype: jcr:primaryType: hipposysedit:nodetype jcr:mixinTypes: ['hipposysedit:remodel', 'mix:referenceable'] hipposysedit:node: true hipposysedit:supertype: ['hippo:compound', 'hippostd:relaxed'] hipposysedit:uri: http://www.onehippo.org/connect/nt/1.0 /ChildCompound: jcr:primaryType: hipposysedit:field hipposysedit:path: application:childCompound hipposysedit:type: application:childCompound
SampleCompound includes ChildCompound as a property, and ChildCompound is another compound document type;
/ChildCompound: jcr:primaryType: hipposysedit:templatetype jcr:mixinTypes: ['editor:editable', 'mix:referenceable'] /hipposysedit:nodetype: jcr:primaryType: hippo:handle jcr:mixinTypes: ['mix:referenceable'] /hipposysedit:nodetype: jcr:primaryType: hipposysedit:nodetype jcr:mixinTypes: ['hipposysedit:remodel', 'mix:referenceable'] hipposysedit:node: true hipposysedit:supertype: ['hippo:compound', 'hippostd:relaxed'] hipposysedit:uri: http://www.onehippo.org/connect/nt/1.0 /text: jcr:primaryType: hipposysedit:field hipposysedit:path: application:text hipposysedit:type: hippostd:html
SampleDocument is a document which includes SampleCompound as a property.
/SampleDocument: jcr:primaryType: hipposysedit:templatetype jcr:mixinTypes: ['editor:editable', 'mix:referenceable', 'relateddocs:relatabledocs'] /hipposysedit:nodetype: jcr:primaryType: hippo:handle jcr:mixinTypes: ['mix:referenceable'] /hipposysedit:nodetype: jcr:primaryType: hipposysedit:nodetype jcr:mixinTypes: ['hipposysedit:remodel', 'mix:referenceable'] hipposysedit:node: true hipposysedit:supertype: ['application:basedocument', 'hippostd:relaxed', 'hippotranslation:translated'] hipposysedit:uri: http://www.onehippo.org/connect/nt/1.0 /TestCompoundData: jcr:primaryType: hipposysedit:field hipposysedit:mandatory: false hipposysedit:multiple: true hipposysedit:ordered: true hipposysedit:path: application:testCompoundData hipposysedit:primary: false hipposysedit:type: hippo:compound
In this definition, TestCompoundData property is defined as a hippo:compound type. In the cms editor configuration, this TestCompoundData property can be defined to use ContentBlocksFieldPlugin to render the page as a content blocks object.
/editor:templates:
jcr:primaryType: editor:templateset
/_default_:
jcr:primaryType: frontend:plugincluster
frontend:properties: [mode]
frontend:references: [wicket.model, model.compareTo, engine, validator.id]
frontend:services: [wicket.id, validator.id]
type: connect:sampleDocument
/TestCompoundData:
jcr:primaryType: frontend:plugin
caption: Compound Data
contentPickerType: links
cpItemsPath: application:sampleCompound
engine: ${engine}
field: TestCompoundData
mode: ${mode}
model.compareTo: ${model.compareTo}
plugin.class: org.onehippo.forge.contentblocks.ContentBlocksFieldPlugin
validator.id: ${validator.id}
wicket.id: ${cluster.id}.left.item
wicket.model: ${wicket.model}
/cluster.options:
jcr:primaryType: frontend:pluginconfig
last.visited.enabled: 'true'
To handle this case, an improvement should be done in runtime beans to handle hippo:compound definitions.
To reproduce the issue;
1. Run hippo-connect project
2. In the documentation.main.content.ftl file update the line;
<#list document.paragraphs as paragraph>
to
<#list document.contentblocks as paragraph>
3. Open the url -> https://documentation.bloomreach.com/about/release-notes/release-notes-overview.html