Hleb
Hleb

Reputation: 7391

Require at most one instance of component on a page

I develop the site with Day CQ5. I am developing templates, components, and pages and faced with a problem. On the page of the site can be one instance of component, and need to prevent the addition of other instances. How can I do this? Maybe someone has faced this problem?

Upvotes: 1

Views: 533

Answers (2)

crispydc
crispydc

Reputation: 362

If the authors don't need the ability to add the component to different areas (parsys containers) of the page, you could just include it in a static location. Authors could then either populate the component or leave it blank to hide it. Then you would leave it out of the sidekick so they couldn't add additional copies.

Upvotes: 1

David Gorsline
David Gorsline

Reputation: 5018

This is just a hint, but it might solve your problem: http://dev.day.com/content/kb/home/cq5/Development/Components/HowToDefineComponentListDynamically.html.

Upvotes: 0

Related Questions