London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
I am not sure what you mean with new page? From a content area you can only reference existing pages. Todo so you could have override SetDefaultValues in your model class and do something like:
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
MainContentArea = new ContentArea();
MainContentArea.Add(ServiceLocator.Current.GetInstance<IContentLoader>().Get<StartPage>(ContentReference.StartPage));
}
Hi all,
How to add a new page (new block) in the ContentArea programmatically? I want to implement this in method "public override void SetDefaultValues(ContentType contentType){}" when the object initializing.
Thanks for your help