DocumentUrlContext.TryTransformSiteRelativeUrl Method
- Namespace
- Kampute.DocToolkit.Routing
- Assembly
- Kampute.DocToolkit.dll
Definition
Attempts to transform a site-relative URL string into an absolute or document-relative URL based on the current context.
public abstract bool TryTransformSiteRelativeUrl(string siteRelativeUrl, [NotNullWhen(true)] out string transformedUrl)Parameters
siteRelativeUrlstring- The URL string relative to site root to transform.
transformedUrlstring- When this method returns, contains the transformed URL if the transformation succeeded; otherwise,
null.
Returns
Remarks
This method transforms URLs that are specified relative to the site root into URLs that work correctly when referenced from the current context, regardless of the document's depth in the documentation hierarchy.
