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
}
精彩评论