Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adding custom property in create tag Dialog

Avatar

Level 2

I have a requirement where I have to store an image corresponding to some tags that I am going to create using Tag Manager console. Can I add a custom property imagepath in create and edit tag dialog. If yes, please let me know how this can be done. If not, can anyone please suggest how can I manage the tag and tag image mapping in CQ5.

1 Accepted Solution

Avatar

Correct answer by
Level 10

All the files under /libs stores the AEM default functionality. If you make any change in any of these files it will affect all website. If you changes is creating any  issue, then It will be the issue for all site on that instance. As @Scott suggested, to minimize the risk, always override file.

I guess here you can find the Tagging file which you can override : /libs/cq/tagging/widgets/source/widgets/admin/TagAdmin.Actions.js (w.r.t AEM 5.6.1)

View solution in original post

7 Replies

Avatar

Level 1

singh_divyas did you come up with an alternative method to do this?  I have a similar request, but if this could be accomplished by some other means I would be up to considering it.

Avatar

Level 4

What happens if you upload the image on DAM and attach multiple tags to it 

Avatar

Level 10

Modiying the default Create Tag manager dialog (under /libs) is not a recommended use case.

[img]TagAPI.png[/img]

You can overlay this component and modify the dialog to meet your business requirements. 

Avatar

Level 1

Why is this not a recommended method?

Avatar

Level 10

When I said not a recommended use case - I meant do not modify components/content under /libs. (modifying AEM components under /libs is bad practice) 

Now if the use case is to upload an asset to the DAM and tag it automatically- this is a valid use case. You can build an event handler that responds when content is added to a JCR location - ie - the DAM.

Then you can use the Tag manager API to tag assets. This would be a custom implementation. We have a community article that talks about how to use the Tag Manager API from within an Event Handler: 

https://helpx.adobe.com/experience-manager/using/tagmanager.html

Avatar

Level 1

I know I can tag my assets in the DAM and then write logic that will grab the asset that corresponds to the tag.  However this will have the possibility of having multiple images tagged with the same tag.  The request that I am getting is that they want to build a component that lists out tags under a namespace and then when they click on a tag in the list have all the pages that relate to that tag display.  However a part of that is to have an image associated with the tag list.  Yes I could do this by also tagging an image in the dam and then matching the tag to that image.  That would be the easiest to upgrade in the future I know.  However my clients are not concerned with that and they would rather make creating tags and editing tags as simple on that tagging author as possible.  I know you can overlay dialogs and extend them.  I have done it in the past with the assetdialog by overlaying this file as such /apps/wcm/core/content/tools/assetdialog  However I don't know if there is a way to overlay the dialog for the new and edit dialogs for tag management.  Do you know what the path would be for overlaying these dialogs?  I don't see where these dialogs are setup when I look through the content explorer.

Avatar

Correct answer by
Level 10

All the files under /libs stores the AEM default functionality. If you make any change in any of these files it will affect all website. If you changes is creating any  issue, then It will be the issue for all site on that instance. As @Scott suggested, to minimize the risk, always override file.

I guess here you can find the Tagging file which you can override : /libs/cq/tagging/widgets/source/widgets/admin/TagAdmin.Actions.js (w.r.t AEM 5.6.1)