There will a
situation where we have to add a multifield in content fragment and also this
post covers how to add icon picker in dialog
Step1: Add a new field in CF model as “Single line text”
Step 2: In the properties Tab do as follows:
Render As: multifield and
other
properties as shown below:
Step 3: Now go to path where that CF model is there in crx/de:
/conf/<project-name>/settings/dam/cfm/models/<content-fragment>
There will be a list of items which
have been added in CF model:
There are properties which needs to be added for this single line text field(Unique key) |
And the other properties for field and childnodes will be as follows:
<_x0031_620908963443
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Quick Links"
fieldLabel="Quick Links"
listOrder="1"
maxlength="255"
metaType="text-single"
name="quickLinks"
renderReadOnly="false"
showEmptyInReadOnly="true"
valueType="string[]">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./quickLinks">
<items
jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<linklabel
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldLabel="Link Label"
name="./linkLabel"/>
<linkpath
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldLabel="Link Path"
name="./linkPath"
rootPath="/content/dam/soi"/>
<linkicon
jcr:primaryType="nt:unstructured"
sling:resourceType="acs-commons/components/authoring/graphiciconselect"
emptyOption="{Boolean}true"
fieldLabel="Link Icon"
name="linkIcon"
renderReadOnly="false"
showEmptyInReadOnly="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="acs-commons/components/utilities/genericlist/datasource"
path="/etc/acs-commons/lists/font-awesome-icons"/>
</linkicon>
</items>
</column>
</items>
</field>
No comments:
Post a Comment