Class ContentFinderByRedirectUrl
Provides an implementation of IContentFinder that handles page URL rewrites that are stored when moving, saving, or deleting a node.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public class ContentFinderByRedirectUrl : IContentFinder
Remarks
Assigns a permanent redirect notification to the request.
Constructors
View SourceContentFinderByRedirectUrl(IRedirectUrlService, ILogger<ContentFinderByRedirectUrl>, IPublishedUrlProvider, IUmbracoContextAccessor)
Initializes a new instance of the ContentFinderByRedirectUrl class.
Declaration
public ContentFinderByRedirectUrl(IRedirectUrlService redirectUrlService, ILogger<ContentFinderByRedirectUrl> logger, IPublishedUrlProvider publishedUrlProvider, IUmbracoContextAccessor umbracoContextAccessor)
Parameters
| Type | Name | Description |
|---|---|---|
| IRedirectUrlService | redirectUrlService | |
| ILogger<ContentFinderByRedirectUrl> | logger | |
| IPublishedUrlProvider | publishedUrlProvider | |
| IUmbracoContextAccessor | umbracoContextAccessor |
Methods
View SourceTryFindContent(IPublishedRequestBuilder)
Tries to find and assign an Umbraco document to a PublishedRequest.
Declaration
public async Task<bool> TryFindContent(IPublishedRequestBuilder frequest)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishedRequestBuilder | frequest | The |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | A value indicating whether an Umbraco document was found and assigned. |
Remarks
Optionally, can also assign the template or anything else on the document request, although that is not required.