How to report on "annotations"? | Community
Skip to main content
Level 2
November 10, 2022
Solved

How to report on "annotations"?

  • November 10, 2022
  • 1 reply
  • 741 views

Is it possible to extract the annotation data (attributes and values) using the ACS AEM Commons "Reports" functionality?

I'm trying to find the "annotations" node in CRXDE Lite, but can't find it.

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 lukasz-m

Hi @blue-dog,

Yes this is possible to get annotation data using Reports from ACS Commons. Here is an example, for below crx structure

.

  • Report configuration, I have used following SQL query to get the data:
    SELECT child.* FROM [nt:base] AS parent INNER JOIN [nt:base] AS child ON ISCHILDNODE(child, parent) WHERE ISDESCENDANTNODE(parent, "{{path}}") AND name(parent) = "cq:annotations"
    where {{path}} is variable to pass content path to query to generate the report.

    Above screen shows which component has been used to build the report and, what exact values each component contains.
  • Sample result - to be clear I have added 2 annotation on page from we-retail for testing purposes

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
November 10, 2022

Hi @blue-dog,

Yes this is possible to get annotation data using Reports from ACS Commons. Here is an example, for below crx structure

.

  • Report configuration, I have used following SQL query to get the data:
    SELECT child.* FROM [nt:base] AS parent INNER JOIN [nt:base] AS child ON ISCHILDNODE(child, parent) WHERE ISDESCENDANTNODE(parent, "{{path}}") AND name(parent) = "cq:annotations"
    where {{path}} is variable to pass content path to query to generate the report.

    Above screen shows which component has been used to build the report and, what exact values each component contains.
  • Sample result - to be clear I have added 2 annotation on page from we-retail for testing purposes
Blue-DogAuthor
Level 2
November 11, 2022

@lukasz-m this helped. Thank you!