开发者

How to get the parent page of a PageDefinitionTypePlugIn property in EPiServer?

I've got a [PageDefinitionTypePlugIn] PropertyString (it's a dropdownlist), and I'd like to be able to detect what it's parent page is. Generally, Global.EPDataFactory.CurrentPage works fine to return the page, but when a NEW page is being cre开发者_JS百科ated, CurrentPage returns null.

I need to know prior to the render of the control what the parent is, since I'm changing the list of values in the dropdown depending on where the current page is in the navigation heirarchy structure.

Thanks, Lance


protected void Application_Start( object sender, System.EventArgs e ) {
 EPDataFactory.CreatingPage += new EPiServer.PageEventHandler( OnCreatingPage );
}

private void OnCreatingPage( object sender, EPiServer.PageEventArgs e ) {
  e.TargetLink <-- should be the parent
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜