Expand my Community achievements bar.

Apache Sling Pipes , real world examples | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Apache Sling Pipes , real world examples by Adobe Tech Blog | Kaushal Mall

Abstract

1. Do you want to move your AEM tags from /etc/tags to /content/cq:tags?
2. Do you want to update the cq:designPath property across 1,000s of pages is AEM because the design was moved from /etc/design to /apps/settings?
3. Have you heard about Sling Pipes but can’t find any real world examples on how to make it happen in AEM?
4. Read on for three real world scenarios that will hopefully help you unlock the power Sling Pipes for most of your use cases.

Pre-requisite
Unfortunately, the Sling Pipes bundle is not included AEM OOTB. Before you do anything else, please install the Sling Pipes and Sling Query bundles on your AEM instance — both of these are available on Maven Central.

Calling your pipe
All pipes in this blog can we accessed via POST call, like:
curl -u admin:admin -X POST http://localhost:4502/path/to/mypipe.json

Moving AEM tags
Sling Pipe to move tags from /etc to /content
1. Creates the cq:tags folder
2. Add properties to the folder
3. Finds all the cq:Tag nodes under /etc/tags.
4. Moves them by replacing the /etc/tags in the path with /content/cq:tags.

Updating a single value property
1. Runs a query to find all cq:Page nodes where the cq:designPath property is set to /etc/designs/mydesign.
2. Gets the jcr:content node of the page.
3. Updates the property with the path under /apps/settings/….

Read Full Blog

Apache Sling Pipes , real world examples

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies