Hi there,
I wanted to add a page property while creating a new page and below is my partial code of dialog.xml
<blogAuthor
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
class="multifield-full-width"
fieldLabel="Blog Authors"
cq:showOnCreate="true">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Blog Author"
class="multifield-full-width"
name="./blogAuthor">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="project/components/content/author-datasource"
name="datasource"/>
</field>
</blogAuthor>
This is the output of page creation
I even added the typehint so that the parameter is stored as an array.
<blogAuthor_TypeHint
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/hidden"
name="./blogAuthor@TypeHint"
ignoreData="true"
value="String[]"/>
smacdonald2008 any help on this?
Views
Replies
Total Likes
Quite wild guess: but there might be blogAuthor already created and that's why its not getting "updated".
Views
Replies
Total Likes
But if that's the case then it should throw me an error when I am editing the page too! But it works fine when I am a editing the page. Only during page creation, there is some issue. Something related to POST servlet?
Views
Replies
Total Likes
You can refer to the OOTB implementation of vanity URL in Basic tab
/libs/foundation/components/page/cq:dialog/content/items/tabs/items/basic/items/column/items/vanityurl/items/vanitypath
Isn't it similar to your usecase, or am I missing something here?
Views
Replies
Total Likes
If you see that vanity url's are not set during the page creation, It can be set only during page edit. So I get this error in the multifield only during page creation, while editing the page it works fine!
Views
Replies
Total Likes