EditFrames の使用
概要
Edit Frames により、エクスペリエンス エディターが直接アクセスできないフィールドにアクセスできます。
エクスペリエンス エディターの EditFrames は、直接アクセスできないフィールドへのフロントエンド アクセスをユーザーに提供するために使用できる機能です。直接アクセスできない理由は、表示されていないことかフロントエンドで直接編集できないタイプであることのいずれかです。
次のような EditFrames 機能を使用します。
@using (Html.EditFrame("/sitecore/content/Home", null, "My custom title", "My custom tooltip", "cssClassName", null)) { <p>Inside of edit frame.</p> }
パラメーターは以下のとおりです。
DataSource
Buttons
Title
Tooltip
CssClass
Parameters
DataSource
パラメーターは次の形式で渡すことができます。
/sitecore/content/Home
{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}
RenderingContext.Current.ContextItem.ID.ToString()
RenderingContext.Current.PageContext.Item.ID.ToString()
Html.Sitecore().CurrentRendering.DataSource
この形式を使用するには、レンダリングに [データ ソース] フィールドを作成する必要があります ([プレゼンテーション]、[詳細]、[コントロール]、[レンダリング])。