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.
Solved! Go to Solution.
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);