How to achieve currentPage.getContentResource("pagecontent/issue") on sightly? | Community
Skip to main content
mikezooz
Level 4
February 26, 2018
Solved

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

  • February 26, 2018
  • 2 replies
  • 2597 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by mikezooz

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}

2 replies

Hemant_arora
Level 8
February 26, 2018

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

mikezooz
mikezoozAuthorAccepted solution
Level 4
February 27, 2018

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}