Class UrlHelperPreviewExtensions
Provides extension methods for the UrlHelperExtensionPoint.
public static class UrlHelperPreviewExtensions
- Inheritance
-
objectUrlHelperPreviewExtensions
Methods
ApplyPreviewContext(UrlHelperExtensionPoint, string)
Extends the given url by information about the current website channel and preview mode
when used within the Kentico Xperience administration UI (Page builder, Page preview).
public static string ApplyPreviewContext(this UrlHelperExtensionPoint instance, string url)
Parameters
instanceUrlHelperExtensionPointThe object that provides methods to build URLs to Kentico content.
urlstringURL that is to be extended. The following URL formats will be extended: Relative (virtual) or absolute path.
Returns
- string
The
urlextended by the preview information when used within the Kentico Xperience administration UI, otherwise the originalurl.
Remarks
Use this method within your MVC site codebase only. It is not intended for use in UI components and UI pages of the Kentico Xperience administration UI.
Exceptions
- ArgumentNullException
instanceis null.- ArgumentException
urlis null or empty.