Try our conversational search powered by Generative AI!

Extending PropertyContentAreaControl


In an attempt to create a Razor-supporting version of the Drag and Drop Bootstrap page editing displayed on the Alloy site, I have created an implementation of PropertyContentAreaControl as follows:

public class ApetitoPropertyContentAreaControl : PropertyContentAreaControl
        public override void CreateDefaultControls()

        public override void CreateOnPageEditControls()

        private void CreateContentAreaControls(bool editMode)
            // Do stuff

I have registered it using the ClassFactoryInitiliazation and selected it as the Presentation Control on my Page's ContentArea property. 

While CreateDefaultControls() is hit when rendering a preview of a Block in edit mode, neither CreateDefaultControls() nor CreateOnPageEditControls() are hit when the page is rendered in normal or edit mode.

I'm sure I'm missing something quite simple, an attachment of the class to the page/blocks in question but I can't find anything in the Alloy site to point me in the right direction.

Both my page and blocks inherit from Site* classes that I've pulled from the Alloy site.

Jan 22, 2013 13:53


Given that you mention a Razor-based template I suspect that you are using MVC. A web forms based web control, like the one you show, will never be loaded if the main template is MVC-based. You have to create a partial view instead to render your property if the main template is based on MVC.

Jan 22, 2013 15:57

I'm not sure how it eluded me for so long that this was a Web Forms control, after completely running out of ideas I now know exactly where to go. Thanks!

Jan 22, 2013 16:07

Out of interest, we are looking to recreate the ability to drop in floated blocks and dynamically resize them as they're added, are there any working examples of this as with the Alloy Web Forms site?

Jan 22, 2013 16:36

I think that there's an example in the MVC-template package that was just released:

Jan 22, 2013 17:32

Linus, that link to MVC templates currently gives access denied (at least to me ;-) ).

Jan 23, 2013 8:42

It seems it will be publicly released later today so please have a look in a few hours.

Jan 23, 2013 9:41
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.