Duplicating a custom component | Community
Skip to main content
Level 9
December 29, 2015
Solved

Duplicating a custom component

  • December 29, 2015
  • 2 replies
  • 882 views

Hi All,

1] Suppose, I have a custom component say 'x'. I want to create a duplicate of this and rename that to 'x-duplicate'.

2] Also, in content.xml I have changed the jcr:title to "x" and "x-duplicate" respectively.

3] The sling:resourceType of the components respectively, when added on the page is as below:

a/b/c/x

a/b/c/x-duplicate

4] However, the duplicate component when added on the page is not visible in author, but can be seen in backend[crxde].

Am I missing anything. Any thoughts on this will be helpful.

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 edubey

Make sure the jsp or sightly file of the component is having same name as of component. If you haven't changed it, do now.

x-duplicate.jsp or x-duplicate.html

2 replies

edubey
edubeyAccepted solution
Level 10
December 29, 2015

Make sure the jsp or sightly file of the component is having same name as of component. If you haven't changed it, do now.

x-duplicate.jsp or x-duplicate.html

askdctmAuthor
Level 9
December 29, 2015

Hi Edubey,

Thank you for your reply.

My bad, had changed it to x-duplicate.html, but had not given a build. 

Once again, thank you.