Delegation Pattern and Sightly | Community
Skip to main content
Level 4
November 17, 2022
Solved

Delegation Pattern and Sightly

  • November 17, 2022
  • 2 replies
  • 1258 views

I am implementing this within my solution: Delegation Pattern for Sling Models · adobe/aem-core-wcm-components Wiki (github.com).  I'm inheriting the core Image component and extending it with some additional properties and markup.

 

Within Sightly, is there a way to just render the delegated component?

 

For instance, I want to do something like this:

 

<section data-sly-use.custom="..."> <h1>${custom.someProp}</h1> <!-- render injected delegate here. In my case, it's custom.image --> </section>
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 VeenaK

Hi @dylanmccurry ,

I hope this what your looking for, it explains how delegation of Image component works and how can you call the custom attributes in sightly.

https://kiransg.com/2021/11/07/aem-core-component-delegation/

 

Hope this helps!!!

2 replies

VeenaKAccepted solution
Level 4
November 17, 2022

Hi @dylanmccurry ,

I hope this what your looking for, it explains how delegation of Image component works and how can you call the custom attributes in sightly.

https://kiransg.com/2021/11/07/aem-core-component-delegation/

 

Hope this helps!!!

Community Advisor
November 18, 2022