how to exract parrent component name from child component ? | Community
Skip to main content
Level 4
Dec 9, 2021 1:17 PM UTC
Solved

how to exract parrent component name from child component ?

how to extract parent component name from child component ? ex: i have composite component, component A has many child component, i need to extract component A name in the child component's html page with help of sightly.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Dec 9, 2021 3:11 PM UTC

Hi,

If you need to get parent node name then you can use below in sightly

${resource.parent.name}
Arun Patidar

4 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Dec 9, 2021 3:11 PM UTC

Hi,

If you need to get parent node name then you can use below in sightly

${resource.parent.name}
Translate
Arun Patidar
Level 4
Dec 9, 2021 3:15 PM UTC

Thanks Arun! this helps lot.

Translate
Kiran_Vedantam
New Participant
Dec 9, 2021 2:28 PM UTC

Hi @karthick1356 

 

Sample JS code here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/htl-getting-property-value-from-parent-component/m-p/219206

 

You can work with java in the same way!

 

Hope this helps!

 

Thanks,

Kiran Vedantam.

Translate
Level 4
Dec 9, 2021 2:50 PM UTC

Thanks Kiran. letme try this solution.

Translate