C# Класс Geta.EPi.Extensions.LinkItemExtensions

LinkItem Extensions.
Показать файл Открыть проект

Открытые методы

Метод Описание
GetFriendlyUrl ( this linkItem, bool includeHost = false ) : string

Returns friendly URL if item is EPiServer content, otherwise returns the original Href property value.

ToContent ( this source ) : IContent

Returns IContent for provided LinkItem if it is EPiServer content otherwise returns null.

ToContentReference ( this source ) : EPiServer.Core.ContentReference

Returns ContentReference for provided LinkItem if it is EPiServer content otherwise returns EmptyReference.

Описание методов

GetFriendlyUrl() публичный статический Метод

Returns friendly URL if item is EPiServer content, otherwise returns the original Href property value.
public static GetFriendlyUrl ( this linkItem, bool includeHost = false ) : string
linkItem this Source LinkItem for which to return external URL.
includeHost bool Mark if include host name in the url.
Результат string

ToContent() публичный статический Метод

Returns IContent for provided LinkItem if it is EPiServer content otherwise returns null.
public static ToContent ( this source ) : IContent
source this Source LinkItem for which to return content.
Результат IContent

ToContentReference() публичный статический Метод

Returns ContentReference for provided LinkItem if it is EPiServer content otherwise returns EmptyReference.
public static ToContentReference ( this source ) : EPiServer.Core.ContentReference
source this Source LinkItem for which to return content reference.
Результат EPiServer.Core.ContentReference