November Happy Hour will be moved to Thursday December 5th.

Problem with on page edit when page has multiple content ares

Vote:
 

Hi,

 

I have three conent areas on a page. The first area renders corrently, but the other don't.

The blocks are there, but the wrapping divs and drag/drop html is missing.

@Html.PropertyFor(x => x.CurrentPage.TopContentArea, new { EditContainerClass = "blockArea topContentArea clearfix", CssClass="blockArea topContentArea clearfix", ChildrenCssClass="block" })

@Html.PropertyFor(x => x.CurrentPage.MiddleContentArea, new{ EditContainerClass = "blockArea middleContentArea clearfix", CssClass="blockArea middleContentArea clearfix", ChildrenCssClass="block" })

@Html.PropertyFor(x => x.CurrentPage.BottomContentArea, new{ EditContainerClass = "blockArea bottomContentArea clearfix", CssClass="blockArea bottomContentArea clearfix", ChildrenCssClass="block" })

    

Really lost here....

Thanks

 

 

 

 

 

 

#73701
Aug 06, 2013 12:32
Vote:
 

you need to apply edit attributes in the controller for the properties. I got the same issue but had forgot to applyeditattribute for the properties.

This needs to be done when working with the PageViewModel in the MVC templatepackage.

var editingHints = ViewData.GetEditHints<PageViewModel<ArticlePage>, YourPageType>();

editingHints.AddConnection(m => m.CurrentPage.YourContentArea, p => p.YourContentArea);

#73704
Aug 06, 2013 14:12
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.