how to exract parrent component name from child component ? | Community
Skip to main content
New Participant
December 9, 2021
Solved

how to exract parrent component name from child component ?

  • December 9, 2021
  • 2 replies
  • 1096 views

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.
Best answer by arunpatidar

Hi,

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

${resource.parent.name}

2 replies

arunpatidar
arunpatidarAccepted solution
New Participant
December 9, 2021

Hi,

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

${resource.parent.name}
Arun Patidar
New Participant
December 9, 2021

Thanks Arun! this helps lot.

Kiran_Vedantam
New Participant
December 9, 2021

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.

New Participant
December 9, 2021

Thanks Kiran. letme try this solution.