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

How to always allow a same component to a parsys?

Avatar

Level 9

Hi All,

I have requirement that for a particular parsys every time same component  is used.As soon as i create a page with a template page,my page should come with that component.

I know we can do it by going in design mode but since we know what component is used i want to handle it in component rendering script.

Is there any way to do so??

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 10
4 Replies

Avatar

Level 9

Steve Cave wrote...

You do that like this: 

https://docs.adobe.com/docs/v5_1/html-resources/cq5_howto_website/ch01s12.html

 

The above link let's how to create a parsys,i know that.

Generally parsys are place holders for components.I know on a particular place of parsys there is always specific component is used.

As soon as i create a page that parsys renders with that automatically!!! so i will not go again to design mode to select the required component.

Thanks,

Kishore

Avatar

Employee Advisor

You can add the parsys node with the component node under your page template cq:template. With this whenever you will create a new page the node structure under the template node will be copied as it is under the page node. And when you open the page for editing you will see the component included in the parsys. 

See the following thread for more details - http://stackoverflow.com/questions/22392147/cq5-preload-a-parsys-with-components

Avatar

Correct answer by
Level 10