sitecore
LinkManager
サーチ…
構文
- public static string GetItemUrl(アイテムアイテム)
- パブリック静的文字列GetItemUrl(アイテムアイテム、UrlOptionsオプション);
アイテムのURLを取得する
シンプルなサイトコレクションアイテムがあれば:
Item item;
アイテム自体にURLが含まれていません。アイテムのURLを取得するには、 static
クラスSitecore.Links.LinkManager
呼び出す必要があります
string url = LinkManager.GetItemUrl(item);
これのオーバーロードはUrlOptions
クラスを受け入れます:
UrlOptions options = new UrlOptions
{
AddAspxExtension = false
....
};
string url = LinkManager.GetItemUrl(item, options);
Modified text is an extract of the original Stack Overflow Documentation
ライセンスを受けた CC BY-SA 3.0
所属していない Stack Overflow