Cleanup
This commit is contained in:
@@ -408,7 +408,7 @@ namespace Umbraco.Web.Editors
|
||||
/// <returns></returns>
|
||||
public HttpResponseMessage GetNiceUrl(Guid id)
|
||||
{
|
||||
var url = UmbracoContext.UrlProvider.GetUrl(id);
|
||||
var url = UmbracoContext.Url(id);
|
||||
var response = Request.CreateResponse(HttpStatusCode.OK);
|
||||
response.Content = new StringContent(url, Encoding.UTF8, "text/plain");
|
||||
return response;
|
||||
|
||||
@@ -202,6 +202,17 @@ namespace Umbraco.Web
|
||||
return UrlProvider.GetUrl(contentId, culture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the url of a content identified by its identifier.
|
||||
/// </summary>
|
||||
/// <param name="contentId">The content identifier.</param>
|
||||
/// <param name="culture"></param>
|
||||
/// <returns>The url for the content.</returns>
|
||||
public string Url(Guid contentId, string culture = null)
|
||||
{
|
||||
return UrlProvider.GetUrl(contentId, culture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the url of a content identified by its identifier, in a specified mode.
|
||||
/// </summary>
|
||||
@@ -214,6 +225,18 @@ namespace Umbraco.Web
|
||||
return UrlProvider.GetUrl(contentId, mode, culture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the url of a content identified by its identifier, in a specified mode.
|
||||
/// </summary>
|
||||
/// <param name="contentId">The content identifier.</param>
|
||||
/// <param name="mode">The mode.</param>
|
||||
/// <param name="culture"></param>
|
||||
/// <returns>The url for the content.</returns>
|
||||
public string Url(Guid contentId, UrlProviderMode mode, string culture = null)
|
||||
{
|
||||
return UrlProvider.GetUrl(contentId, mode, culture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute url of a content identified by its identifier.
|
||||
/// </summary>
|
||||
@@ -225,6 +248,17 @@ namespace Umbraco.Web
|
||||
return UrlProvider.GetUrl(contentId, true, culture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the absolute url of a content identified by its identifier.
|
||||
/// </summary>
|
||||
/// <param name="contentId">The content identifier.</param>
|
||||
/// <param name="culture"></param>
|
||||
/// <returns>The absolute url for the content.</returns>
|
||||
public string UrlAbsolute(Guid contentId, string culture = null)
|
||||
{
|
||||
return UrlProvider.GetUrl(contentId, true, culture);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private string PreviewToken
|
||||
|
||||
Reference in New Issue
Block a user