November Happy Hour will be moved to Thursday December 5th.

Drag and drop block, clone instance or same instance? Extend existing dojo-components?

Vote:
 

Hi,

Me and a few colleagues of mine discussed if it would be possible to extend the "drag and drop" features of blocks for EPiServer..

Basically our scenario would be that we have a bunch of shared blocks across our site, these blocks are all templates of content/blocks.

Once an editor drag and drop one of the blocks we would like to show a dialog with a message asking them if they want to use the same instance of the block, or a cloned instance of the block.

I assume this would be possible to achive using an EditorDescriptor, however.. is it possible to extend the javascript/dojo-component of the current implementation of a content area somehow?

#197646
Oct 09, 2018 13:09
Vote:
 

Hi,

Sure, you just have to inherit the current implementation (see "epi-cms/contentediting/editors/ContentAreaEditor" and "epi-cms/widget/overlay/ContentArea") and create an EditorDescriptor for ContentArea type with EditorDescriptorBehavior set to OverrideDefault. I usually unzip "~/modules/_protected/CMS/CMS.zip" so I can check the default implementation. The files are located in "{version-number}/ClientResources/epi-cms" folder in the zip file.

#197716
Edited, Oct 11, 2018 8:34
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.