Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

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

Avatar

Correct answer by
Level 4

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}

View solution in original post

2 Replies

Avatar

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

Avatar

Correct answer by
Level 4

@Hemant Arora  : thanks for your reply.

The correct and short answer is

${pageProperties['pagecontent/issue']}