Expand my Community achievements bar.

SOLVED

How can I get the data of the properties?

Avatar

Level 1

I need to query the page properties under 1 path, the properties to query: template (cq:template), title(jcr:title), isActive(cq:lastReplicationAction)

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
2 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Community Advisor

Hi, 

Can you elaborate on what you need? You could simply do this by getting the Page's properties, something like this:

Page currentPage = pageManager.getContainedPage(resourceResolver.getResource("/content/mysite/en"));

if (currentPage != null) {
            // Get properties
            String template = page.getProperties().get("cq:template", String.class);
            String title = page.getProperties().get("jcr:title", String.class);
            String isActive = page.getProperties().get("cq:lastReplicationAction", String.class);
} 

 

Hope this helps

 



Esteban Bustamante