ページ プロパティ > 基本に新しい選択タイプ フィールド「テーマ」を追加しました。WCM で同じテンプレートを使用して新しいページを追加すると、「テーマ」オプションも表示されます。これは明らかです。子ページのフィールドを非表示にする方法はありますか?
PSこれは、子ページに同じテンプレートを使用しているためです。
ページ プロパティ > 基本に新しい選択タイプ フィールド「テーマ」を追加しました。WCM で同じテンプレートを使用して新しいページを追加すると、「テーマ」オプションも表示されます。これは明らかです。子ページのフィールドを非表示にする方法はありますか?
PSこれは、子ページに同じテンプレートを使用しているためです。
同じテンプレートを使用して、ページ プロパティ ダイアログを異なるものにすることはできません。
あなたができることは、ダイアログをオーバーロードすることです
次に、次のような親ページ プロパティを取得するために、ページ jsp にコードを含める必要があります。
// if the parent page is always a certain level below the root you can use
// currentPage.getAbsoluteParent(3); to get the third page down from the top
// of the current path tree.
Page parentPage = currentPage.getParent();
ValueMap parentPageProperties;
if (parentPage != null) {
parentPageProperties = parentPage.getProperties();
}
// This tries to get the property 'theme' from the current page. If that fails
// then it tries to get the property from the parent page. If that fails it
// defaults to blank.
theme = properties.get("theme", parentPageProperties.get("theme", ""));
簡単な解決策は、テンプレート/ページ コンポーネントの 2 番目のセットを作成することです。ページ コンポーネント B をリソース タイプとして使用するテンプレート A があるとします。