Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

How to report on "annotations"?

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @ncw3qwp,

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

crx-structure.jpg.

  • 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.
    report-config.png
    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
    report-result.png
2 Replies

Avatar

Correct answer by
Community Advisor

Hi @ncw3qwp,

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

crx-structure.jpg.

  • 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.
    report-config.png
    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
    report-result.png