Fixes umbracoInternalRedirectId property to work with UDI IDs
This commit is contained in:
@@ -35,6 +35,18 @@ namespace Umbraco.Web.PublishedCache
|
||||
return GetById(UmbracoContext.InPreviewMode, contentId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a content identified by its unique identifier.
|
||||
/// </summary>
|
||||
/// <param name="contentId">The content unique identifier.</param>
|
||||
/// <returns>The content, or null.</returns>
|
||||
/// <remarks>Considers published or unpublished content depending on context.</remarks>
|
||||
public IPublishedContent GetById(Guid contentId)
|
||||
{
|
||||
var intId = UmbracoContext.Application.Services.EntityService.GetIdForKey(contentId, UmbracoObjectTypes.Document);
|
||||
return GetById(intId.Success ? intId.Result : -1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a content identified by its unique identifier.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user