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

Access PageProperties from a Component + Sightly

Avatar

Avatar
Validate 25
Level 3
patK-ze1xYs
Level 3

Likes

19 likes

Total Posts

60 posts

Correct Reply

2 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
patK-ze1xYs
Level 3

Likes

19 likes

Total Posts

60 posts

Correct Reply

2 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
patK-ze1xYs
Level 3

15-10-2015

[Thread Edited By Adobe]

/*Don’t forget to meet and greet your fellow peers virtually by telling them about yourself here

Go ahead and to it now: https://adobe.ly/3eDnB4v */

 

Actual Question:

In JSP I have used (currentPage.getContentResource()).getResourceType() to access resourcetype of a template from a component.

In sightly I wondered if we can access the same using ${pageProperties}

I am trying following from the component.html , and I get empty String Values

${pageProperties.cq:designPath} <br/>

${pageProperties.jcr:title} <br/>

${pageProperties.sling:resourceType} <br/>

How can I do this in Sightly  ?   

desktop_exl_promo_600x100_gdrp.png

View Entire Topic

Avatar

Avatar
Validate 1
Level 2
cmr96960454
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
cmr96960454
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile
cmr96960454
Level 2

08-06-2018

Actually we can read the page properties in CQ as below.

${pageProperties.jcr:description}

If we enter jcr:description as some html content is page properties. How to read/handle that in sightly?  Any suggestions please?