Is it possible to invoke custom model class and with core component html | Community
Skip to main content
Level 2
March 27, 2023
Solved

Is it possible to invoke custom model class and with core component html

  • March 27, 2023
  • 2 replies
  • 802 views

Hi I wanted to extend navigation core component. I have created a proxy component without any html and just 

slingResourceSuperType = "core/wcm/components/navigation/v1/navigation"

I have my custom model class where I am trying to build my custom navigation items. but unfortunately when I call this proxy component inside a HTL using below command doesn't invoke my custom model class.

<sly data-sly-resource="${resource @ resourceType='path/to/custom/proxy/navigation'}">

How can I reuse core component html with my custom model class?

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 Saravanan_Dharmaraj

@srikanth7792 , Please check the below post and video in this blog, it explains how the model class is invoked based in resource type

https://www.albinsblog.com/2020/04/aem-core-components-deep-dive-how-to-extend-aem-core-cmponents.html#.ZCH3KOyZMV9

 

2 replies

Saravanan_Dharmaraj
Community Advisor
Saravanan_DharmarajCommunity AdvisorAccepted solution
Community Advisor
March 27, 2023

@srikanth7792 , Please check the below post and video in this blog, it explains how the model class is invoked based in resource type

https://www.albinsblog.com/2020/04/aem-core-components-deep-dive-how-to-extend-aem-core-cmponents.html#.ZCH3KOyZMV9

 

DPrakashRaj
Community Advisor
Community Advisor
March 31, 2023

I believe you need to over ride the html in your component as well