Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

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

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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.ht...

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@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.ht...

 

Avatar

Community Advisor

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