How to achieve currentPage.getContentResource("pagecontent/issue") on sightly? | Community
Skip to main content
mikezooz
Level 4
Feb 26, 2018 1:12 PM UTC
Solved

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

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.
mikezooz
mikezoozAccepted solution
Level 4
Feb 27, 2018 4:32 PM UTC

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}

2 replies

mikezooz
mikezoozAuthorAccepted solution
Level 4
Feb 27, 2018 4:32 PM UTC

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}

Translate
Hemant_arora
Level 8
Feb 26, 2018 1:21 PM UTC

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

Translate