0

I am working on a functionality where the user selects a Tag from a namespace and clicks a button.

Currently, we have a text box where user needs to enter the tag ID. But its not convenient for them to know the tagID.

Is there any way to create a Tags Widget (or a Path Browser) on a component HTML, similar to how it works in the dialog ?

I know Coral UI dependencies may be an issue, but just curious if we can achieve that. I've never done something like this.

Tadija Malić
  • 445
  • 7
  • 26
Riju Mahna
  • 6,718
  • 12
  • 52
  • 91

1 Answers1

0

I hadwritten a similar answer here

AEM Tools: Tag Picker using Coral

I had overlaid the

cq/gui/components/common/tagspicker

in the apps folder, and then edited the piece of code in the render.jsp to pick the tags from the desired path.

AttrBuilder attrs = htmlTag.getAttrs(); . . . . .

attrs.add("data-basepath", cfg.get("tagsPath", tagSpace));

where tagSpace refers to the custom tag location inside the /etc/tags/customTagSpace

You can pass it inside an OSGI configuration or anything configurable, where inside the render.jsp you can pick up using scriptlets or other methods and then display it.

Akshay Rathnavas
  • 338
  • 4
  • 16