1

[PageDefinitionTypePlugIn] PropertyString (ドロップダウン リスト) を取得しました。親ページが何であるかを検出できるようにしたいと考えています。通常、Global.EPDataFactory.CurrentPage は正常に機能してページを返しますが、新しいページが作成されると、CurrentPage は null を返します。

現在のページがナビゲーション階層構造のどこにあるかに応じて、ドロップダウンの値のリストを変更しているため、コントロールをレンダリングする前に親が何であるかを知る必要があります。

ありがとう、ランス

4

1 に答える 1

2
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
}
于 2010-02-01T14:55:58.123 に答える