Hello,
I have a requirement to add two additional tag fields in page properties below original tags field.(i am using cq/gui/components/coral/common/form/tagfield). As you can see from the picture there are two additional fields, Luka tags and Marko tags. They are both mandatory and both have their defined namespaces(Luka namespace and Marko namespace).
The problems i am encountering are as follows:
1. When i save tag that was manually entered or selected from a tag from a specific namespace, it saves the tag under "default" namespace but i want it to save the tag under "Luka namespace" if the tag was entered in "Luka tags" field. If the tag is entered in "Marko tags" then i want it saved under "Marko namespace". Is there a way to do this using properties in CRXDE? If not, how would i achieve this?
2. The other problem i'm having is that if you look at the picture, every field that is related to tags has the same tags list. I want every tag field to have its own taglist depending on where the tag was created. For example, if the tag was created using "Marko tags" field than i would like to display that particular tag to the taglist that is below "Marko tags" field. The current behaviour is that whenever i add tags and click save&done, the next time i open page properties, every taglist under every tags field is the same(as showed in picture). How can i create separate tag list for every tags fields?
Any help is greatly appreciated.
Thanks in advance,
Luka
Solved! Go to Solution.
Views
Replies
Total Likes
I feel those tag fields are part of your page component [we used to call it project specific base page component].
If we take a look at CRXDE to understand the details about those tag field then we will get similar kind of details as shown below -
I have created 3 separate tag fields to replicate your requirement as shown below -
Here , we must have unique value for property: name for each tag fields as shown below -
I feel you are having same value at property called: name for each tag field. That's why you are facing 1st problem.
To address the 2nd issue , you could fix the problem using rootPath with different taglist value as shown below -
Because of the different rootPath value finally I am able to display different set of tags for each tag field -
Hope this will help.
Hi @luka2
1. I'm not sure whether I understood the question correctly but I have two namespaces and two tag fields (the default one and custom one which I created). When i author a tag in each tagfield from each namespace and save the properties, i can see them being saved correctly on the page.
2. I think the issue here is for all the three tag fields the 'name' property seems to be the same. For the default/OOTB tag field, the 'name' usually will be 'cq:tags'. Please provide different name property for 'Luka tags' and 'Marko tags'. The name can be anything like lukeTags, markoTags etc. Please do this change and check whether it resolves your first issue as well.
Do let me know if this resolved your query.
Thanks
Hello @JeevanRaj,
Thank you very much for your answer.
What you said does solve my second issue(because name properties were the same) but the issue number one still persists, for example when i want to save the "savedtag" (like in the picture below)
Then i am expecting for that tag to get saved in AEM tags>Luka tags
My namespace folder Luka tags stays empty.
I feel those tag fields are part of your page component [we used to call it project specific base page component].
If we take a look at CRXDE to understand the details about those tag field then we will get similar kind of details as shown below -
I have created 3 separate tag fields to replicate your requirement as shown below -
Here , we must have unique value for property: name for each tag fields as shown below -
I feel you are having same value at property called: name for each tag field. That's why you are facing 1st problem.
To address the 2nd issue , you could fix the problem using rootPath with different taglist value as shown below -
Because of the different rootPath value finally I am able to display different set of tags for each tag field -
Hope this will help.
Hello @DEBAL_DAS,
I really appreciate your detailed answer. It has helped me gain more understanding about this issue.
The second problem is resolved but the first problem remains tho.
For example when i want to save the "savedtag" (like in the picture below)
Then i am expecting for that tag to get saved in AEM tags>Luka tags
My namespace folder Luka tags stays empty.
Understood your first problem. It won't get saved/persisted there ideally. Those tag list will get saved at jcr:content node of your test-page as shown below -
Could you please share screenshot of your page property dialog fields and tag structure like the below one -
Got it. Thanks for your help! So i guess its a custom solution for that first problem.
Before jump to the custom solution , I would like to know the path from where you have browsed the savedtag as shown below -
Why do you want to save these tags in AEM tags>Luka tags while authoring from business perspective?
I misunderstood that requirement actually, i got it cleared today. There isnt any need for author to manually enter tags at all, he will just choose from the namespace of predefined tags and add them to the page.
Thank you for you help!
Views
Likes
Replies