This project is read-only.
Extends ContentArea property by adding possiblity to limit content types of blocks and pages dropped on Content Area.

Getting started

To use the editor add the following ExtendedContentAreaEditorDescriptor.UIHint to any ContentArea property and define types supported by editor.
ContentAreaSupportedTypes is the property attribute that takes list of supported block types as a constructructor parameter.
using System.ComponentModel.DataAnnotations;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.DataAnnotations;
using EPiServer.Templates.Alloy.Models.Blocks;
using OpenWaves.EPiServer.ExtendedContentareaEditor;

namespace EPiServer.Templates.Alloy.Models.Pages
    [SiteContentType(GUID = "7D6A4D93-2A49-4545-BC97-FFD6A6998EEF")]
    public class ArticlePage : EPiServer.Core.PageData
        [ContentAreaSupportedTypes(typeof(EditorialBlock), typeof(ImageBlock))]
        public virtual ContentArea ContentArea1 { get; set; }
In the example above, only blocks of type EditorialBlock or ImageBlock will be available to select in edit mode.

Onpage and form editing mode

For valid block types there is no difference between standard ContentArea editor and ExtendedcontentAreaEditor.

OnPage editing preview:

formediting ok.png

Form editing preview:

onpage ok.png

For invalid block types the drop area become disabled and warning message is displayed.

OnPage editing preview:

formediting stop.png

Form editing preview:

onpage stop.png

Last edited Jun 7, 2013 at 11:44 AM by grzwie, version 8


No comments yet.