Highlighted

Extend Core-Components(Page Component)

mb36960082

02-04-2018

Hi,

I am able to extend the core-comopnent's title component but when i try to do the same for core page component, it doesn't work.

Here's my structure in the below screenshot, i just copied the structure from core page component's dialog. I am using AEM 6.3 and core-components 2.04.

Can someone help me with this? TIA!

Screen Shot 2018-04-02 at 1.08.36 PM.png

Replies

Highlighted

Julio_Tobar

02-04-2018

It looks to me like you're trying to "copy and paste" the core components which is not a best practice. You see, when working with core-components we're expected to follow "proxy pattern" which essentially means we need to extend (sling:resourceSuperType) the core component.

If for some reason you still need to "copy and paste"  a core component then make sure you provide your own properties for the component such as: component group, inherit from proper components (sling:resourceSupertType).

Regards,

Highlighted

mb36960082

02-04-2018

I am following the proxy pattern. I am using sling:resourceSuperType: core/wcm/components/page/v2/page for my page-test-1 component.

Then i am trying to change title label for my testing and it doesn't change. I am doing the exact same thing for core title component and i am able to modify the title component's dialog fields.

Highlighted

Julio_Tobar

02-04-2018

Ok, so it loooks like you're doing it the right way....

I see you are following "Sling Merger" for providing your custom "field label" to your "page component"; by looking at the image it seems like you created the right structure for the field but maybe we need to double check. Here's what I would:

1) copy paste the whole dialog from core component into custom component. This is to make sure we do not have structure issues

2) Make sure you select proper component when creating the "editable template" (maybe you are still selecting a previous version of the component for which you have not updated dialog)

Highlighted

mb36960082

03-04-2018

Thanks Julio for the reply.

I did copy paste the dialog from core page component and the template is also using the correct versioned component.

The only difference i see from title and page component is, basicpage component in libs is using mnt/overlay for the tabs.

Does anyone have issues with extending if the super type component uses mnt/overlay?