Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Content Finder drag and drop associations

Avatar

Level 7

Since the search feature isn't currently working, I will just post here anyway:

I want to change the association that happens when you drag and drop an asset from the Content Finder (say an Image) onto a parsys. Currently you always get associated with a foundation Image component within the parsys. I want it to create a custom component (e.g. CustomImage).

Can anyone let me know where I find these associations and how to change them?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

In order to do what you are describing, you will need to override the standard Image Content Finder tab. Overriding a Content Finder tab is the same as creating a new one, you just assign it the id of an existing tab. See http://helpx.adobe.com/experience-manager/kb/CustomCFTab.html for an article about creating a custom Content Finder tab.

If you look at /libs/wcm/extensions/contentfinder/images.js, it should be clear where the association between the tab and the resource type is set up. Same is true for the video and documents tabs.

HTH,

Justin

View solution in original post

11 Replies

Avatar

Level 9

If I understand your question correctly, it seems that you want to know what will be sling:resourceType when you drag and drop a component on parsys.

For image, it will be the path that image component resides, if you drag and drop any other component then it will display that component's resourceType.

For custom component it will be the path where you placed your component. Please elaborate if there are any specific questions on the problem you are facing.

Avatar

Level 7

No - I mean dragging an asset from the content finder, not a component from the sidekick.

If you grab an Image from the content finder on the left and drop it into your parsys, it will automatically create an Image component based on the foundation Image component in CQ. I don't want a foundation image component to be added to the parsys, I want my custom image component to be added to the parsys automatically.

Avatar

Level 10

See this community article:

Creating a CQ widget that supports image drag and drop 

It talks about  creating a CQ Dialog that lets a user select an image during design time. The component is used by the CQ parsys system, supports a Dialog with multiple tabs, and enables the functionality offered by the Content Finder (for example, drag-and-drop).

Understanding this will help you in this use case. 

Avatar

Level 7

Thanks for that article. I understand how to create a custom component that supports drag and drop from the content finder and have created such a component already that extends the foundation image component.

The use case for this is: "The content producers would like to drag and drop an image directly from the content finder onto the Page. This should automatically embed the customised Image component (NewsImage) into the parsys, not the default (foundation) image component"

The client does not want to drag a custom component, then drag the image onto that component. This should happen automatically like it does when you drag an image directly into a parsys.

Do you have a community article that instructs us how to change this default behaviour?

Avatar

Level 7

For example:

  • If I drop an Image from the CF to the parsys, I get a foundation/components/image
  • If I drop a Video from the CF to the parsys, I get a foundation/components/video
  • If I drop a PDF from the CF to the parsys, I get a foundation/components/download

Where are these associations set?

Avatar

Level 10

Place the custom component onto a template - that way - they do not need drag the component from the sidekick onto a page - it's there already. See: 

http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2012/06/default-components-in-your...

This is the only way i can see to avoid having to drag a component onto a page. 

Avatar

Level 7

smacdonald2008 wrote...

Place the custom component onto a template - that way - they do not need drag the component from the sidekick onto a page - it's there already. See: 

http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2012/06/default-components-in-your...

This is the only way i can see to avoid having to drag a component onto a page. 

 

So its not possible to change the default associations when a content finder asset is dropped directly into a parsys?

Avatar

Correct answer by
Employee

Hi,

In order to do what you are describing, you will need to override the standard Image Content Finder tab. Overriding a Content Finder tab is the same as creating a new one, you just assign it the id of an existing tab. See http://helpx.adobe.com/experience-manager/kb/CustomCFTab.html for an article about creating a custom Content Finder tab.

If you look at /libs/wcm/extensions/contentfinder/images.js, it should be clear where the association between the tab and the resource type is set up. Same is true for the video and documents tabs.

HTH,

Justin

Avatar

Level 7

Hi Justin - thanks for that. I stumbled across these JS files just now as you replied.

I found this section in the /libs/wcm/extensions/contentfinder/image.js which looks like the association between the asset and the component:

CQ.wcm.ContentFinderTab.getResultsBoxConfig({ "itemsDDGroups": [CQ.wcm.EditBase.DD_GROUP_ASSET], "itemsDDNewParagraph": { "path": "foundation/components/image", "propertyName": "./fileReference" }

Cheers!

Avatar

Level 7

It also seems important to note (that was left out of the Community Guide) is that there is a maximum number of Content Finder tabs allowed. The maximum number of tabs is 11 and after that you cannot add any more as the Content Finder locks up. This allows you to create a maximum of one extra tab before you have to disable one of the existing built-in tabs.

This probably should be put on the Community Guide to save people a lot of headaches and debugging time.

Avatar

Level 10

Thanks Darren and Justin !! This is definitely helpful..