I am building my first EPiServer site and running into a problem. I have a section on a page where I want to allow a single instance of a block. I create ContentReference property and limit it to a specific type of block. When I output it in the view using PropertyFor, I do not see any way to enable on-page editing of that block. At least I would have expected the blue line around it that would give me a menu to edit/remove the block, but nothing. I even applied EditAttributes to a div around to no avail. What am I doing wrong? Does that edit experience only work with ContentArea? Below is a how I have it implemented on my page class, from which I am using IContentLoader to load the reference into my view model:
[Display(
GroupName = SystemTabNames.Content,
Name = "Hero (Reference)",
Order = 20)]
[AllowedTypes(typeof(SimpleHeroBlock.SimpleHeroBlock))]
[UIHint(UIHint.Block)]
public virtual ContentReference Hero { get; set; }