November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi,
In your example, it looks like you're creating the block as a child of the articlePage where you should be creating it in that page's asset folder. The asset folder doesn't exist by default but you can get or create it as a single action like this:
var contentAssetHelper = ServiceLocator.Current.GetInstance<ContentAssetHelper>();
var assetFolderLink = contentAssetHelper.GetOrCreateAssetFolder(articlePage.ContentLink).ContentLink;
You can then use assetFolderLink as the parent of your new block in your GetDefault() call.
Hi,
i'm trying to create content in a ContentArea of a page. I want to store this block in "for this page", as if the user would create it there manually.
But i get an exception "...is not allowed to be created under ArticlePage ..." at _contentRepository.Save. So how to do it correctly? This is my code: