Class VirtualPathArguments
Used as argument in for example GetUrl(ContentReference, String, VirtualPathArguments) to create an outgoing url.
Inheritance
Inherited Members
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class VirtualPathArguments
Constructors
VirtualPathArguments()
Initializes a new instance of the VirtualPathArguments class.
Declaration
public VirtualPathArguments()
Properties
Action
Gets or sets the action method that should be linked to.
Declaration
public string Action { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ContextMode
Gets or sets the mode for the links.
Declaration
public ContextMode ContextMode { get; set; }
Property Value
Type | Description |
---|---|
ContextMode |
Remarks
If not explicitly set it will use current ContextMode
ForceCanonical
Gets or sets a value indicating whether the canonical URL should be returned if there are multiple hostnames defined for the site.
Declaration
public bool ForceCanonical { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
If not set explicitly, the hostname of the resolved URL will be dependent on the current context. If the resolved content is on a different site than the current, the canonical URL will always be returned. If the content is on the same site, the canonical URL will only be returned if the current hostname is set to be redirected.
RequestContext
Gets or sets the request context.
Declaration
public RequestContext RequestContext { get; set; }
Property Value
Type | Description |
---|---|
System.Web.Routing.RequestContext |
Remarks
If not explicitly a new instance of RequestContext will be created.
RouteValues
Gets or sets the route values.
Declaration
public RouteValueDictionary RouteValues { get; set; }
Property Value
Type | Description |
---|---|
System.Web.Routing.RouteValueDictionary |
Remarks
If not explicitly a new instance of System.Web.Routing.RouteValueDictionary will be created.
ValidateTemplate
Gets or sets a value indicating whether there should be a validation that checks if the IContent type has a template. If the type has no template and ValidateTemplate is true, the UrlResolver will return null as the URL.
Declaration
public bool ValidateTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
The default value is true.
To get Url for a ContentFolder (which has no template) set ValidateTemplate = false.