Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Component Re-use

Avatar

Level 5

We have a request from the content authors to make there lives easier by allowing them to create a component once and then simply reference it whereever they want to use it. This would be useful for some marketing banners where they enter things like the heading, subheading, image details, links, tracking ids etc etc. The same banner can be used on multiple category pages in different positions say maybe 10-20 locations.

I was wondering if people have addressed this use case before, I can see Adobe are starting to look at this with content fragments but they are limited to copy at the moment and this is a more complex component. 

1 Accepted Solution

Avatar

Correct answer by
Level 10

There is not direct OOTB way to do it, but you can use below method:

1. Create a separate page Page X where you will author this Component A. (This component will get stored under a node in Page X)

2. On any page use reference component and select the node component A node of Page X

When ever you change component A in page X, changes will be reflected everywhere

View solution in original post

6 Replies

Avatar

Level 10

We have a request from the content authors to make there lives easier by allowing them to create a component once and then simply reference it whereever they want to use it. 

All components that you build in AEM are re-useable. You build them as a AEM component developer and place them on the side rail or side kick. An author then drags and drops them on multiple pages. 

I am not clear what the issue is. 

Avatar

Employee

You can use reference component for this purpose .

Avatar

Level 5

Sorry for not being as clear as I could smiley I meant that they don't want to configure the component every time, simply configure it once e.g. fill in the dialog and then on several pages reference that component so any changes made in the dialog would just be made once and reflected on all pages where that instance of the component is used. 

Avatar

Administrator

Hi

Please refer to this Community Article:- http://blogs.adobe.com/experiencedelivers/experience-management/default-components-in-your-parsys/

// Make Component part of Template. It is pre-filled template, so when you create a page, it would have pre filled component. So all the pages create by template would have same content. 

When you make changes to content of template, the changes would get reflected across the pages.

Reference links:- 

http://stackoverflow.com/questions/22392147/cq5-preload-a-parsys-with-components

http://suryakand-shinde.blogspot.in/2015/01/how-to-create-page-with-predefined.html

 

 

Option 2 could be:- if you want to have it configurable on one page and reuse it everywhere one option would be iparsys, which is an inheriting parsys that traverses up the page hierarchy until it finds a component in it.

Link:- http://stackoverflow.com/questions/21053131/how-do-we-define-global-properties-in-cq5

 

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Correct answer by
Level 10

There is not direct OOTB way to do it, but you can use below method:

1. Create a separate page Page X where you will author this Component A. (This component will get stored under a node in Page X)

2. On any page use reference component and select the node component A node of Page X

When ever you change component A in page X, changes will be reflected everywhere

Avatar

Level 5

Thanks for all the replies given us plenty to go on.