ForPageAsync(IPublishedContent, UrlType, Dictionary<string, string>)

Gets the url for the specified published content of a page.

public async ValueTask<string> ForPageAsync(IPublishedContent content, UrlType type = 1, Dictionary<string, string> routeValues)
Returns:
ValueTask<string>

Parameters

The published content for the page to return the url for,

type UrlType

The url format type to return.

routeValues Dictionary<string, string>

Optional route values for dynamic urls.

ForPageAsync(string, CultureInfo, UrlType, Dictionary<string, string>)

Gets the url for the specified page node id and culture.

public async ValueTask<string> ForPageAsync(string nodeId, CultureInfo culture, UrlType type = 1, Dictionary<string, string> routeValues)
Returns:
ValueTask<string>

Parameters

nodeId string

The page node id to return the url for,

culture CultureInfo

The culture to return the url for.

type UrlType

The url format type to return.

routeValues Dictionary<string, string>

Optional route values for dynamic urls.

In this article