Expand my Community achievements bar.

Get foundation component property in parent node sling model

Avatar

Level 2

Hello all, I just start using Sling models, and I have an issue to retrieve a child node property in the parent model.

here is my jcr structure.

the image node is  from the foundation components. My aim is to get the "filereference" property of the image component in the Topbanner model  then in its sightly script. here is my topbanner code :

    1564751_pastedImage_5.png  

the error I am getting is Identifier Mypackage.models.TopBanner cannot be correctly instantiated by the Use API. ( in the sightly script)

Any help ?

Thank you in advance

10 Replies