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 report on "annotations"?

Avatar

Level 2

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

View solution in original post

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