Picking Block in Dynamic Content

Vote:
 

Is it even possible right now.  Right now what i am doing is I have a content area on the page type and not in the view.  This allows the editor to select the content area from the page property dc and it renders just fine.  I am curious if there is a dynamic content area where the user can select a block.  Thanks in advance

#63095
Nov 09, 2012 3:29
Vote:
 

Hello Joshua!

Unfortunately there is no solution (at least that I know of) for this right now. Our intents was and still is to merry dynamic content and blocks since there is really not a need for both of these technologies. Since we did not have time to do this I intend to see if I can find some sort of support for this until we make this possible but I have not had time for this yet...

#63099
Nov 09, 2012 7:46
Vote:
 

Thanks Linus, I was going crazy trying to figure it out.  I appreciate the response.  Not sure who is responsible for the forum but when i try to mark this item as answered, i am asked to signup or login.  weird.

#63136
Edited, Nov 10, 2012 4:00
Vote:
 

Any updates on this one? We just ran into a situation where we would like to be able to select blocks from a Dynamic Content and the solution right now is to point a PageReference from the Dynamic Content to a page type with only a ContentArea where the blocks are placed. We ended up with this because the customer wants to be able to place blocks inside the "main body".

Thanks for you help!

#65202
Jan 23, 2013 9:48
Vote:
 

I have done a proof of concept where I have inserted a content fragment (basicaly a reference to a content item) inside a Tiny MCE. While this works technically there are some improvements that needs to be done to get this into production shape. First of all, I needed the Tiny MCE upgrade to get generic support for non-editable-areas inside Tiny MCE. The upgrade is now done but I have not gotten the time yet to finalize this. I hope to be able to get this into the Sparrowhawk upgrade planned for Q1 but there is a risc that the final solution needs changes to the episerver assembly which would postpone this until the next framework release later this year. I'll post here as soon as I know more...

#65229
Edited, Jan 23, 2013 14:39
Vote:
 

For anyone following this thread: I have just checked in support for dragging a block into a content area. Unless something is found during testing this will be part of the Sparrowhawk 7.1-upgrade that will be release in Q1 this year.

#65383
Jan 28, 2013 16:18
Vote:
 

Great Linus!

So this means that you can drag blocks to a dynamic content dialog or that you can drag it to the editor itself?

#65384
Jan 28, 2013 16:21
Vote:
 

You will be able to drag it directly to the editor, pretty much the same way as you would for a content area.

#65390
Jan 28, 2013 17:47
Vote:
 

Linus, I can't get this to work in the newly released 7.1?

#69985
Apr 10, 2013 14:44
Vote:
 

Hi!

This feature is actually in the release, but there are a few bugs in the EPiServer core that made us take the decision to hide it by default. It's possible to enable it quite easilly and hopefully we can fix the issues in the next core patch. I'll post the code needed to activate this below but first let's go through the bugs:

  1. No access rights filtering on blocks/content inside an xhtml string.
  2. No filtering for publishing start and stop dates.
  3. No resursivity check for items. That means you can drag a reference to yourself and crash the page/block using it.
  4. Relating to an item that has been permanently deleted (even from the wastebasket) might cause an exception.

Given that you accept the flaws above and/or that we release a patch that fixes these issues you can enable this feature by doing two things. The first is to add an editor descriptor that extends/overrrides the meta data for the default descriptor:

using System;
using System.Collections.Generic;
using EPiServer.Core;
using EPiServer.Shell.ObjectEditing.EditorDescriptors;

namespace Samples
{
    public class ExtentionXhtmlStringEditorDescriptor : EditorDescriptor
    {
        public override void ModifyMetadata(EPiServer.Shell.ObjectEditing.ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
        {
            metadata.EditorConfiguration["AllowedTypes"] = new[] { "fileurl", "link", "epi.cms.content.light" };
        }
    }
}

You might have noticed that we are lacking the EditorDescriptorRegistration attribute for the descriptor. The reason for this is that editordescriptors are executed as a list for a given type/ui-hint. There is currently no control of the order of execution for EPiServer 7.0 (this has been added for the next framework release). So to ensure that our descriptor is called after the default descriptor we register it manually in an initialization module. This is done like this:

public void Initialize(Framework.Initialization.InitializationEngine context)
{
    //Other initialization

    var metadataHandlerRegistry = ServiceLocator.Current.GetInstance<MetadataHandlerRegistry>();
    metadataHandlerRegistry.RegisterMetadataHandler(typeof(XhtmlString), new ExtentionXhtmlStringEditorDescriptor());
}

In the next framework release this should be enabled by default and you should remove the code above.

#70072
Edited, Apr 11, 2013 13:13
Vote:
 

Hi Linus!

We have installed 7.1 now. Should it work do drag n drop blocks into the editor now or do we still need to insert the code above?

Thanks!

#70549
Edited, Apr 23, 2013 10:21
Vote:
 

Hi!

You need to validate that you accept the bugs/flaws mentioned above and then insert the code above to activate this.

#70553
Apr 23, 2013 10:50
Vote:
 

Hi Linus.

I cannot get this to work. I tested both in my project and in the Alloy example site. I have contacted the EPiServer support team and the told me to ask you here why your example doesn´t work. So, that´s what I´m doing :)

I have the 7.1 version.

The Init seems ok because the metadata.EditorConfiguration["AllowedTypes"]  is set everytime I edit my pages.

/R

#71191
May 13, 2013 14:59
Vote:
 

Hmm, work on my 7.1-site. Has anyone else got this to work?

Does your initialization module have any dependencies to any of the EPiServer modules? If you do a call to metadataHandlerRegistry.GetMetadataHandlers(typeof(XhtmlString)); before registering your handler should give you a list with an instance of XhtmlStringEditorDescriptor inside it. Just want to make sure that your handler is added after the default one.

#71328
May 15, 2013 18:39
Vote:
 

OK, thanks, I will try it.

But as the support team says, this feature is not yet supported by EPiServer, so we don´t dare to use it just yet...

#71339
May 16, 2013 8:53
Vote:
 

Yes I have a XhtmlStringEditorDescriptor when I call GetMetadataHandlers. It this good or bad? Should it work now?

#71510
May 21, 2013 13:44
Vote:
 

@Linus: I've tried your code but don't get it to work. Blocks can't be dropped in editors. Any ideas how to troubleshoot?

#74660
Sep 03, 2013 17:48
Vote:
 

I was trying this "drag'n'drop block to editor with given code without success either. Anyone else than @Linus got this working?

#75134
Sep 18, 2013 13:56
Vote:
 

@Linus: Will this new drag'n'drop of blocks into editors be a working feature in the new EPiServer 7.5 CMS release?

#75937
Oct 11, 2013 14:17
Vote:
 

Yes, this will be part of 7.5 and we should hopefully have fixed all known issues until then. That's the main reason (except of lack of time) that I have not spent time investigating this further in 7.1.

#75940
Oct 11, 2013 14:49
Vote:
 

Great. Is there a release date for 7.5?

#75942
Edited, Oct 11, 2013 16:49
Vote:
 

@Linus: Did this feature make it to the release of EPiServer 7.5?
I cant find anything in the release notes.

#112658
Nov 03, 2014 12:51
Vote:
 

Yes, I don't think it got listed in the release notes for some reason but I've blogged about it here: http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2013/12/Customizing-the-look-and-behavior-in-the-UI-for-your-content-types/

#112681
Nov 04, 2014 8:37
Vote:
 

Perfect! Thanks for that :)

#112702
Nov 04, 2014 10:52
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.