Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Ignite 1
Level 2
Rajashankar
Level 2

Likes

5 likes

Total Posts

22 posts

Correct Reply

2 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 3
Give Back
Boost 5
View profile

Avatar
Ignite 1
Level 2
Rajashankar
Level 2

Likes

5 likes

Total Posts

22 posts

Correct Reply

2 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 3
Give Back
Boost 5
View profile
Rajashankar
Level 2

06-06-2018

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

06-06-2018

You can access any page property from component like below:

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

Thanks

Arun

Answers (1)

Answers (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

06-06-2018

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