Expand my Community achievements bar.

SOLVED

Delegation Pattern and Sightly

Avatar

Level 5

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>
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 5

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!!!

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

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!!!