Skip to main content
Level 9
Dec 29, 2015 7:29 AM UTC
Solved

Duplicating a custom component

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.
edubey
edubeyAccepted solution
Level 10
Dec 29, 2015 7:53 AM UTC

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
Dec 29, 2015 7:53 AM UTC

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

Translate
askdctmAuthor
Level 9
Dec 29, 2015 8:26 AM UTC

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.

Translate