search
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Yes. Here's some pseudo code
YourContentAreaProperty.Add(IContent);
Or if you already have a contentarea with references something like this.
YourPage.SetValue("ContentAreaPropertyName",contentareawithreferences).
Don't forget to save the page
contentRepository.Save(yourpageobject, EPiServer.DataAccess.SaveAction.Publish, Security.AccessLevel.NoAccess);
This does not appear to work. After adding the block (IContent) it appears in the ContentArea, but after the save and reload the block disappears. It's also worth noting that it best to set where the saved block will be saved.
hi, is there a way to add block on a content area programmatically?