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 Allow/Restrict Component WITHOUT Using Design Mode

Avatar

Level 2

I have a component called widget-container

Another component called accordion-item (screenshot below)

[img]widgets.PNG[/img]

widget-container contains a parsys tag (in widget-container.jsp)

accordion-item just contains simple markup for now

My goal/conditions are as follows:

  • I will define where widget-container is allowed via design mode
  • If an author place a widget-container on the page, then he/she can now drop accordion-item into it
  • author can NOT drop accordion-item anywhere else

I tried play around with allowedParents & allowedChildren properties but no luck.

Can my requirements be achieved in CQ5? If yes, how so?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Typically people use Design mode to control what components are allowed. If you are trying to do this without using Design mode -- have you looked at the Geometrixx sample:

http://localhost:4502/content/geometrixx/en/company/press/asseteditor.html 

This sample shows how to use a parsys and build a composite component to restrict the accordion content to a set of components.

View solution in original post

4 Replies

Avatar

Level 2

First of all, thanks for the reply! I appreciate it.

Unfortunately I've already been to that site and many others, none helped as they just provide high level answers or throw in another link.

So now we know a goal or a term, but we still don't know how to arrive at those terms given how complex CQ5 dev is.

Please help us, all we need to do here is to tell a parsys (not from design mode) within a component to only allow/restrict specified components

Avatar

Correct answer by
Level 10

Typically people use Design mode to control what components are allowed. If you are trying to do this without using Design mode -- have you looked at the Geometrixx sample:

http://localhost:4502/content/geometrixx/en/company/press/asseteditor.html 

This sample shows how to use a parsys and build a composite component to restrict the accordion content to a set of components.

Avatar

Level 2

Hi, I've already looked at that component, I really couldn't strip out anything for my purposes from that complex component.

I'm fairly new to CQ5 and am running on a project schedule so I can't really afford spending days dissecting that complex component you mentioned, is it really THAT complicated to achieve what I need to do?

All developers in my company feel conflicted about CQ5 as it has amazing features but would take us forever to develop something due to terrible documentation and support, which makes it hard for us to fully recommend the product to clients.