textfield value from parent page | Community
Skip to main content
manikanthar1295
Level 5
May 3, 2022 10:21 AM UTC
Solved

textfield value from parent page

Hi Team,

 

I have Page component for that i have added one text field for basic tab  i.e SITE NAME. 

 

  I have created multiple level child  pages based on above page component. when ever i edit child page properties i am able to see SITE NAME test field if i enter SITE NAME=abc.com its comming in page property lke SITE-name=abc.com if i leave empty i am not able to see SITE_NAME property in pages.

 

Now  the requirement is i will not enter the SITE NAME for child pages but its parent page contains SITE Name  how i will get parent page site name  child page. 

 

 

 

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
May 3, 2022 2:02 PM UTC

2 replies

arunpatidar
arunpatidarAccepted solution
New Participant
May 3, 2022 2:02 PM UTC
Magicr
Level 6
May 3, 2022 11:28 AM UTC

Did following way not work?

 

Page currentPage = request.getResource().adaptTo(Page.class);

Page parentPage = currentPage.getParent();

String siteName = parentPage.getProperties().get("SITE-name",String.class);

Translate