AI OnAI Off
Hi Kiran,
Try this:
public override void SetDefaultValues(ContentType contentType) { base.SetDefaultValues(contentType); var frameRepo = ServiceLocator.Current.GetInstance<IFrameRepository>(); VisibleInMenu = true; this[MetaDataProperties.PageTargetFrame] = frameRepo.Load(0); this[MetaDataProperties.PagePeerOrder] = -1; }
Hope this helps!
Cheers,
John
Hi Kiran,
Do you have a code sample for what you are using subscriptionList on? As for the documentation fixes for obsolete things, I think that it would just be a ton of work to try and maintain something like that. Episerver does give really good documentation on their API's, so you really have to dig through thse to figure out how to use the recommended obsolete fixes. For me, I spend a lot of time in Visual Studio right-clicking on Episerver classes and going to the definition to see how things work. I also did the Episerver advanced development training, which helped a lot in getting up to speed with the CMS API's.
-John
Its declared like
protected EPiServer.Web.WebControls.SubscriptionList SubscriptionList;
and its used like
SubscriptionList.DataBind();
I have code below
But it gives warning on line "this[MetaDataProperties.PageTargetFrame] = Frame.Load(0);" .
It says "Frame.Load(int)' is obsolete: 'Use IFrameRepository instead'
I am not able to find exact replacement for this. Anyone has idea?