Interface IUrlProvider
Provides urls.
Namespace:System.Dynamic.ExpandoObject
Assembly:umbraco.dll
Syntax
public interface IUrlProvider
Methods
GetOtherUrls(UmbracoContext, Int32, Uri)
Gets the other urls of a published content.
Declaration
IEnumerable<string> GetOtherUrls(UmbracoContext umbracoContext, int id, Uri current)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | The Umbraco context. |
System.Int32 | id | The published content id. |
System.Uri | current | The current absolute url. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | The other urls for the published content. |
Remarks
Other urls are those that GetUrl
would not return in the current context, but would be valid
urls for the node in other contexts (different domain for current request, umbracoUrlAlias...).
GetUrl(UmbracoContext, Int32, Uri, UrlProviderMode)
Gets the nice url of a published content.
Declaration
string GetUrl(UmbracoContext umbracoContext, int id, Uri current, UrlProviderMode mode)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | The Umbraco context. |
System.Int32 | id | The published content id. |
System.Uri | current | The current absolute url. |
UrlProviderMode | mode | The url mode. |
Returns
Type | Description |
---|---|
System.String | The url for the published content. |
Remarks
The url is absolute or relative depending on mode
and on current
.
If the provider is unable to provide a url, it should return null
.