Expand my Community achievements bar.

Override data-sly-use java class


Level 2

Hello! Can I override the data-sly-use attribute in the parent resourceSuperType with a new class? as of now I can't override it with the new java class

1 Reply


Level 7


Though I am not 100% sure what do you mean by Overriding data-sly-use java class, but I think you are trying to override the class that is invoked using data-sly-use. To achieve that you can simply overlay the markup where the data-sly-use is placed and in the new markup you can put your own implementation.

Similar scenario: https://stackoverflow.com/questions/28571842/display-different-markup-in-sightly-based-on-a-sling-se...