Try our conversational search powered by Generative AI!

Preview drag and drop


In alloy example when i'm on-page edditing mode i can drag and drop items in content area and there are options for blocks that are available in all-properties mode.
How can i enable this for content areas in new project without alloy downloaded.


May 31, 2016 17:53


Alloy does, as far as I recall, use the [AllowedTypes(..)] attribute to restrict the types allowed in Content Areas. It is really simple to add. Episerver's UI will automatically change according to your configuration.

[AllowedTypes(AllowedTypes = new [] { typeof(MyBlockType) })]
public virtual ContentArea ContentArea { get; set; }

More information is available here:

Hope that was the answer you were looking for. :-)

Casper Aagaard Rasmussen

Edited, May 31, 2016 18:53

Sorry my question was not well worded.

So in alloy project when im in "on-page editing" i can also drag and drop stuff into a content area, around content area and change block settings:

Image 1

also i have this options in "all properties" mode:
Image 2

But locally on my empty project i only get block options in "all properties", and in "on-page editing" i can only preview html without changing layout.

Hope i better explained what i whant to have.


Jun 01, 2016 7:16

Hi, Nemanja,

Which version are you on? And how do you render the ContentArea on the view, can you share it?



Jun 01, 2016 13:47


ContentAreas should always be rendered via the @Html.PropertyFor(mo..) helper. That ensures that the necessary markup and scripting is applied when you are working in Edit mode.

    @Html.PropertyFor(model => model.ContentArea)

It sounds to me like that is what you've left out. Joel Abrahamsson has written a detailed blog post covering the magic behind PropertyFor.

You are highlighting a option called 'Display as: Full' in your screenshot. You can get all the information needed from the Developer Guide covering that exact topic.

Hope that helped.

Casper Aagaard Rasmussen


Jun 01, 2016 13:53

Hi Marija And Casper,

Caspers aswer worked, i was using displayFor instead of PropertyFor. When i changed it started giving me same options on on-edit as on view all properties !


Jun 01, 2016 14:20
* 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.