How To Allow/Restrict Component WITHOUT Using Design Mode | Community
Skip to main content
New Participant
October 16, 2015
Solved

How To Allow/Restrict Component WITHOUT Using Design Mode

  • October 16, 2015
  • 4 replies
  • 1240 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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.

4 replies

smacdonald2008
New Participant
October 16, 2015
shan_duAuthor
New Participant
October 16, 2015

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

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

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.

shan_duAuthor
New Participant
October 16, 2015

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.