Created
March 25, 2015 09:45
-
-
Save aburok/b29f2002c283dac0c61e to your computer and use it in GitHub Desktop.
Adding block to content area programatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetBlocks(aboutPage.TopLeftContentBox) | |
.Select(block => new ContentAreaItem() | |
{ | |
ContentLink = ((IContent)block).ContentLink | |
}) | |
.ToList() | |
.ForEach(cai => aboutPage.AdditionalContent.Items.Add(cai)); | |
_contentRepository.Save(aboutPage, SaveAction.Publish); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment