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

Sling resource merge for content: smart use or abuse? | AEM Community Blog Seeding

kautuk_sahni
Community Manager
Community Manager

BlogImage.jpg

Sling resource merge for content: smart use or abuse? by Reyn van de Craats

Abstract

While working on a project, I came across a common requirement for a component which made me think for quite a while on how to best implement it. Since I can't be the only one who came across this, I’d like to share this use case with my view on the problem as well as two possible approaches, a direct approach to implementation and an alternative method I came up with.

Everything is available in a GitHub repository linked at the bottom, in case you would like to try it out for yourself.
Be aware: previous knowledge of Adobe Experience Manager (AEM) is required.

Use case
In this post, we will go over a use case for components that use properties from a resource somewhere else in the JCR tree. A common example is some kind of card component or an overview component that will show a small description of a page and that can be used as a link to this page. The component will point to the page and look up the information that needs to be rendered inside the component.

However, sometimes an author would like to defer from the general information pulled from this linked resource. The dialog of the component could be extended to add fields for the author to overwrite the information obtained from the original source.

The first approach
To solve the use case presented, the more direct approach to solve it in my opinion is to create the following building blocks:
- cq:Component under /apps

Read Full Blog

Sling resource merge for content: smart use or abuse?

Q&A

Please use this thread to ask the related questions.

Topics

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

0 Replies