Expand my Community achievements bar.

SOLVED

cq:dropTargets group to drag cq:page

Avatar

Community Advisor

How can we add cq:dropTargets under cq:editConfig to drag cq:page from content finder pages?

1 Accepted Solution

Avatar

Correct answer by
Level 10

use this in edit config.

<cq:dropTargets jcr:primaryType="nt:unstructured">
    <page
        jcr:primaryType="cq:DropTargetConfig"
        accept="[.*]"
        groups="[page]"/>
</cq:dropTargets>

accept takes regex so you can change that as per your requirements.

Why do you need this..any specific requirement?

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

use this in edit config.

<cq:dropTargets jcr:primaryType="nt:unstructured">
    <page
        jcr:primaryType="cq:DropTargetConfig"
        accept="[.*]"
        groups="[page]"/>
</cq:dropTargets>

accept takes regex so you can change that as per your requirements.

Why do you need this..any specific requirement?

Avatar

Community Advisor

@Amit_Kumar, thanks for your reply.

Scenario is, I've created reference components like carousals in my project. Now, in Siteadmin, I've given page hierarchy under that only carousals template will get display. The task is to use these created page as component and to drag it in our custom Asset Selector on Pages.

The solution you provided me, with the help of that I'm now able to drag cq:page from Content finder or Asset Finder in Asset Selector on any page but the problem I'm facing is, inside classic UI, Asset Selector JSP able to resolve page as component but in Touch UI, it's not, due to which some unexpected output is getting displayed on page. 

Please help me with this as well :) 

Avatar

Level 10

Can you share your dialogs for touch and classic UI?

Avatar

Level 3

Thanks - this is just what I was looking for this morning.

We have a 'Rich Link' component which renders Title, Link, Thumbnail, Tags etc from a target page as a Tile.

Next step is to define the default component in editable templates to allow this component to be created and linked when the page is dragged into the LayoutContainer.

I have tried various combinations of mime types but it is not creating - tried text/html which works for Experience Fragment and .* in the above example.