Custom Actions on AEM component tool bar Touch UI | Community
Skip to main content
Prince_Shivhare
Community Advisor
Community Advisor
July 29, 2017
Solved

Custom Actions on AEM component tool bar Touch UI

  • July 29, 2017
  • 2 replies
  • 2652 views

Hi Team,

I want to add a custom action on my component tool bar in Touch UI.

Now scenario is like -- I have one container component [1]. and inside it I have custom text image component [2] as child of container component [1].

In my container component [1] , I have added a custom action cq:actions --> delete  in cq:EditConfig. and in cq:actionConfigs --> some text [Insert Component] as highlighted in below screenshot.

Now when I click on Insert Component on component tool bar, it should insert same custom text image component below to existing one but inside container component [1]. but not in parsys.

so after inserting there will another custom text image component will appear. so in container, I will have two custom text image component after click on Insert Component.

Can someone please help to write function for Insert Component so that it can add another component in container?

Regards,

Prince

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Hey Prince - writing a script to add a component to AEM is not a typical way of adding a component to a page. Best practice is to drag and drop from the side rail or include it within the actual template. Why are you trying to add a component via a custom toolbar action? 

ie:

<div data-sly-resource="${'content' @ resourceType='core/wcm/components/list/v1/list'}">

2 replies

Level 4
July 31, 2017

you can refer this link for configuring custom cq:action in aem.

smacdonald2008
smacdonald2008Accepted solution
Level 10
July 31, 2017

Hey Prince - writing a script to add a component to AEM is not a typical way of adding a component to a page. Best practice is to drag and drop from the side rail or include it within the actual template. Why are you trying to add a component via a custom toolbar action? 

ie:

<div data-sly-resource="${'content' @ resourceType='core/wcm/components/list/v1/list'}">