November Happy Hour will be moved to Thursday December 5th.

Class UrlFragment

Represents a link in content

Inheritance
System.Object
UrlFragment
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core.Html.StringParsing
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public class UrlFragment : IStringFragment, IReferenceMap

Constructors

UrlFragment(String)

Initializes a new instance of the UrlFragment class.

Declaration
public UrlFragment(string url)
Parameters
Type Name Description
System.String url

The unencoded url.

UrlFragment(String, UrlResolver)

Initializes a new instance of the UrlFragment class.

Declaration
public UrlFragment(string url, UrlResolver urlResolver)
Parameters
Type Name Description
System.String url

The unencoded url.

UrlResolver urlResolver

The URL resolver.

Properties

InternalFormat

Gets the internal format of the link, that is what is stored in db

Declaration
public string InternalFormat { get; }
Property Value
Type Description
System.String

The internal format.

Remarks

For a permanent link the internal format is a guid based link.

ReferencedPermanentLinkIds

Gets an System.Collections.Generic.IList<T> of permanent link ids that are referenced from this fragment.

Declaration
public IList<Guid> ReferencedPermanentLinkIds { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.Guid>

An System.Collections.Generic.IList<T> of permanent link ids that are referenced from this fragment.

Url

Raw URL without any encoding applied

Declaration
public string Url { get; }
Property Value
Type Description
System.String

Methods

GetControl(TemplateControl)

Gets the control that can be placed in Page Control collection

Declaration
public Control GetControl(TemplateControl hostPage)
Parameters
Type Name Description
System.Web.UI.TemplateControl hostPage
Returns
Type Description
System.Web.UI.Control

GetEditFormat()

Gets the link format for edit mode

Declaration
public string GetEditFormat()
Returns
Type Description
System.String

GetViewFormat()

Gets the link format for view mode

Declaration
public string GetViewFormat()
Returns
Type Description
System.String

RemapPermanentLinkReferences(IDictionary<Guid, Guid>)

Remaps permanent links according to the provided link mapping.

Declaration
public void RemapPermanentLinkReferences(IDictionary<Guid, Guid> idMap)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.Guid, System.Guid> idMap

The link mapping.

Implements

Extension Methods