How to access property under jcr:content of page from a component inside a parsys of the page | Community
Skip to main content
RajaShankar
New Participant
Jun 6, 2018 2:48 PM UTC
Solved

How to access property under jcr:content of page from a component inside a parsys of the page

Hi,

I have a parsys component in my page inside this parsys i have dragged and dropped a custom component into the parsys. Now i had customized the page property dialog.Now when i add value to the page dialog this value gets stored under /content/page/jcr:content/customprop .Now i want to access this custom property value inside my custom dragged component jsp inside parsys.

Within Same component i know we can access properties like          <%=properties.get("sling:resourceType", "default title")%>

Whereas how do i access page property inside the component.

Please let me know.

Regards,

Raja

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
Jun 6, 2018 3:26 PM UTC

You can access any page property from component like below:

String title = pageProperties.get("jcr:title","Custom");

Thanks

Arun

Arun Patidar

2 replies

smacdonald2008
Level 10
Jun 6, 2018 3:30 PM UTC

Also notice you are using JSP - best practice in AEM is to replace JSP with HTL.

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Jun 6, 2018 3:26 PM UTC

You can access any page property from component like below:

String title = pageProperties.get("jcr:title","Custom");

Thanks

Arun

Translate
Arun Patidar