Expand my Community achievements bar.

What should I look at when I extend Carousel component? I'm having confusion while extending the html part.

Avatar

Level 1

What should I look at when I extend Carousel component? I'm having confusion while extending the html part.

2 Replies

Avatar

Community Advisor

Hi @con84758 ,

 

The best approach to re-use a component (OOTB or custom) is to proxy that component.

That means, adding the property 

sling:resourceSuperType = <path_to_component>

to the component.

Now, if you want to extend a html for the same, you cannot extend that in 2 ways:

1. Copy the html file from the original component and make changes. [ Best if you need changes within the file itself, like changing class, removing an element etc. ]

2. Inlcude the original .html file in your new .html file which you will create under the component [ Best if you just need to add something on-top/after the already rendering content from the html, like adding another div at the bottom, top or etc. ]

 

You cannot delegate sightly the same way we delegate SLING modals, you would need to overlay or extend in some way ( I can just think of these 2 )

Avatar

Level 1

Exactly, I've created a proxy component by defining the superesourcetype . Also extended the dialog by copying it from ootb carousel. But while creating the html, I've a markup which is totally different from what we have in the ootb.