Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Proxy component not rendering instead rendering from libs

Avatar

Level 2

Hi All,

I have created a proxy component of /libs/wcm/foundation/components/page/

in /apps/myprojectname/components/page/

I have created the component by just copying the complete component at same path in my project.

But  when i render it loads from libs folder only. This is the properties of my proxy component that i added

1838016_pastedImage_1.png

Can anyone please explain what am i doing incorrect here?

Or if you have any other helpful links for creating the proxy component of libs/wcm/foundation components please share.

Thanks in advance.

6 Replies

Avatar

Community Advisor

Hi,

Can you please explain more about the use case?

The core page component is the example of libs page component reuse, not exactly match your component config but helpful to fit to your use case.

/apps/core/wcm/components/page/v1/page



Arun Patidar

Avatar

Level 2

Hi Arun,

I want to add a meta tag related to IE in the head.html.
If i add in any other file it doesn't work.

As we shouldn't make any changes in the original file so i am trying to create its proxy but it is not working.
It is still picking from the libs folder only.

Avatar

Level 3

Hi naziyap131007

For this use case that you want your head.html in apps to take precedence over libs, once you are inheriting the libs component by

providing sling:resourceSuperType property. Add your own head.html file under apps, and then do customization as per your requirements. So head.html under /apps will take the priority.

Best,

Cal

Avatar

Level 2

Hi Cal,

I did try that, still it is not taking from apps.
So i copied complete component from libs to my project and made changes as per my requirement.
It still doesn't work. It always picks from the libs folder only.

I have added other proxy components - text and title from the same folder - those all work fine.
It is only this particular component that always gets picked from the libs only.

Avatar

Level 3

Hi.

You should be giving the sling:resourceSuperType as /libs/wcm/foundation/components/page. Please see the screenshot below.

I have created a page under /apps/AEMTraining/components/structure/page which is inheriting the /libs/wcm/foundation/components/page, and created head.html where I have done the customization and it is reflecting.

title.png

Best,

Cal

Avatar

Level 2

Hi Cal,

I already have another component under structure with name page which has a completely different Sling:resourceSuperType
So I have created this component directly under components folder.
Can you please try and let me know if your are able to do the same with this use case, because i have tried few tricks but it is not reflecting still.
Thanks for your response.

Regards,
Naziya