C# Class Geta.EPi.Extensions.LinkItemExtensions

LinkItem Extensions.
Afficher le fichier Open project: Geta/EPi.Extensions

Méthodes publiques

Méthode Description
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.

Method Details

GetFriendlyUrl() public static méthode

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.
Résultat string

ToContent() public static méthode

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.
Résultat IContent

ToContentReference() public static méthode

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.
Résultat EPiServer.Core.ContentReference