Not able to access jcr:content properties of currentPage.
Hi Community,
I have written this basic code to access jcr:content properties of my current page specifically cq:tags property but it is not working.
public Void activate throws exception{
rootpage=getCurrentPage;
Resource res = getResourceResolver.getResource(rootpage.getPath);
ValueMap pageProperties = res .getValueMap();
tag= (String) properties.get("cq:tags", "Default value");
}
When I'm using getter method to access the cq:tags property it is showing only Default Value and not the real value of cq:tags even though I can see cq:tags property inside jcr:content in pages.
Please help.
Is there any other way of achieving the same task?