C# 클래스 Geta.EPi.Extensions.LinkItemExtensions

LinkItem Extensions.
파일 보기 프로젝트 열기: Geta/EPi.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