Class ContentFinderByUrlAlias
Provides an implementation of IContentFinder that handles page aliases.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public class ContentFinderByUrlAlias : IContentFinder
Remarks
Handles /just/about/anything
where /just/about/anything
is contained in the
umbracoUrlAlias
property of a document.
The alias is the full path to the document. There can be more than one alias, separated by commas.
Constructors
View SourceContentFinderByUrlAlias(ILogger<ContentFinderByUrlAlias>, IPublishedValueFallback, IVariationContextAccessor, IUmbracoContextAccessor, IPublishedContentCache, IDocumentNavigationQueryService)
Initializes a new instance of the ContentFinderByUrlAlias class.
Declaration
public ContentFinderByUrlAlias(ILogger<ContentFinderByUrlAlias> logger, IPublishedValueFallback publishedValueFallback, IVariationContextAccessor variationContextAccessor, IUmbracoContextAccessor umbracoContextAccessor, IPublishedContentCache contentCache, IDocumentNavigationQueryService documentNavigationQueryService)
Parameters
Type | Name | Description |
---|---|---|
ILogger<ContentFinderByUrlAlias> | logger | |
IPublishedValueFallback | publishedValueFallback | |
IVariationContextAccessor | variationContextAccessor | |
IUmbracoContextAccessor | umbracoContextAccessor | |
IPublishedContentCache | contentCache | |
IDocumentNavigationQueryService | documentNavigationQueryService |
Methods
View SourceTryFindContent(IPublishedRequestBuilder)
Tries to find and assign an Umbraco document to a PublishedRequest
.
Declaration
public 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. |