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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to achieve currentPage.getContentResource("pagecontent/issue") on sightly?

michaelvino86
Level 4
Level 4

I am new for HTL,

below code  works on JSP. How to achieve in sightly

currentPage.getContentResource("pagecontent/issue")

please help me how to read the property from "pagecontent/issue" node. The targeted node is issue.

Thanks in advance

1 Accepted Solution
michaelvino86
Correct answer by
Level 4
Level 4

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}

View solution in original post

2 Replies
Hemant_arora
Level 8
Level 8

Create a component.js and include that in your sightly html and then use the javascript-use api to get the content resource and assign it to a variable and use that variable in sightly. Refer to this example https://helpx.adobe.com/experience-manager/htl/using/use-api-javascript.html

michaelvino86
Correct answer by
Level 4
Level 4

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}