In Episerver CMS, you can rename files and templates without affecting the links, and move an Episerver CMS site from a virtual directory to a root site without breaking a single link.
Episerver CMS does not store links in HTML, but instead stores permanent link references. When you access a reference through a property, Episerver CMS resolves the reference to an actual link so you see an HTML link in the content. When you save the content, the property parses the HTML and stores a permanent link.
Note: You can paste a permanent URL into a web browser for debugging.
Episerver CMS preserves additional URL segments and query parameters (after the content-specifying part of the URL) when it converts a permanent link. So, you can link to a specific action on a controller (potentially with parameters) or something routed by a partial router. A registered route must match the URL.
Many of the built-in types such as Url (corresponding to PropertyUrl and PropertyImageUrl properties), XHtmlString (corresponding to PropertyXhtmlString) and LinkItemCollection (corresponding to PropertyLinkItemCollection) support permanent links. However, the basic string (corresponding to ProperyString/PropertyLongString) does not support permanent links because it may contain formats other than HTML. Use the XhtmlString for all HTML content to make use of permanent links.
Link integrity tracking
When you save a content instance, Episerver CMS parses the properties (such as PropertyUrl, PropertyXhtmlString, PropertyLinkItemCollection, and PropertyContentArea) for links to other content instances or files, and stores the references in a reference table to track the items that link to each other.
Web services and RawContent/RawPage/RawProperty
The raw data transfer types only expose the permanent links when you are transferring content (primarily by Web Services and mirroring/export/import). If you need to use any other links, you have to handle the conversion between the Page object to the RawPage object yourself or add post-processing.
The EPiServer.Core.Transfer.IReferenceMap interface on your PropertyData object tells Episerver that you need to handle permanent links. The PermanentLinkMapper handles conversion between permanent links and dynamic links. Access the API using the EPiServer.Web.PermanentLinkUtility class. The EPiServer.Web.IPermanentLinkMapper and EPiServer.Web.PermanentLinkMap classes are underlying components in the PermanentLink architecture, and you typically do not need to access them directly.
Content links references
Permanent links to content consist of the GUID associated with a content, also available as the property IContent.ContentGuid.
Last updated: Oct 26, 2016