Hi ,
I have extended tags property in my base page component using below code for basic tab so that i can make that field mandatory.
<basic
jcr:primaryType="nt:unstructured"
jcr:title="Basic"
sling:orderBefore="article"
sling:resourceSuperType="wcm/foundation/components/basicpage/v1/basicpage/tabs/basic"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured">
<items jcr:primaryType="nt:unstructured">
<title jcr:primaryType="nt:unstructured">
<items jcr:primaryType="nt:unstructured">
<title
jcr:primaryType="nt:unstructured"
maxlength="{Long}70"
fieldDescription="Title must not exceed 70 characters."/>
<tags
jcr:primaryType="nt:unstructured"
required="true" />
</items>
</title>
However It is repeating tags property at the time of new page creation I edit existing page at that time it works fine.
Solved! Go to Solution.
In the Basic tab, there are two properties: tags, which is displayed in Edit mode, and tagsShowOnCreate, which is shown in Create mode. When you extend the "tags" property in your project, it also becomes available in Create mode, resulting in both Tags being visible during page creation.
What I've discovered is that if you extend the tags property, always show it on the Create Page. Therefore, I would recommend hiding the tagsShowOnCreate property using granite:hidden={Boolean}true and proceed with extending the tags node as you've shown in your post.
<tags jcr:primaryType="nt:unstructured"
required="true" />
<tagsShowOnCreate jcr:primaryType="nt:unstructured"
granite:hidden="{Boolean}true" />
There is nice article about extending page properties, please check below:
Views
Replies
Total Likes
Thanks for sharing. I have gone through this however it did n't helped much.
Views
Replies
Total Likes
Can you remove sling:resourceSuperType property and try:
sling:resourceSuperType="wcm/foundation/components/basicpage/v1/basicpage/tabs/basic"
Views
Replies
Total Likes
In the Basic tab, there are two properties: tags, which is displayed in Edit mode, and tagsShowOnCreate, which is shown in Create mode. When you extend the "tags" property in your project, it also becomes available in Create mode, resulting in both Tags being visible during page creation.
What I've discovered is that if you extend the tags property, always show it on the Create Page. Therefore, I would recommend hiding the tagsShowOnCreate property using granite:hidden={Boolean}true and proceed with extending the tags node as you've shown in your post.
<tags jcr:primaryType="nt:unstructured"
required="true" />
<tagsShowOnCreate jcr:primaryType="nt:unstructured"
granite:hidden="{Boolean}true" />
Hey @Mahedi_Sabuj Thanks for the help. It works !!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies