Class ContentFinderByUrl
Provides an implementation of IContentFinder that handles page nice URLs.
Inheritance
System.Object
Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public class ContentFinderByUrl : IContentFinder
Remarks
Handles /foo/bar
where /foo/bar
is the nice URL of a document.
Constructors
View SourceContentFinderByUrl(ILogger<ContentFinderByUrl>, IUmbracoContextAccessor)
Initializes a new instance of the ContentFinderByUrl class.
Declaration
public ContentFinderByUrl(ILogger<ContentFinderByUrl> logger, IUmbracoContextAccessor umbracoContextAccessor)
Parameters
Type | Name | Description |
---|---|---|
ILogger<ContentFinderByUrl> | logger | |
IUmbracoContextAccessor | umbracoContextAccessor |
Properties
View SourceUmbracoContextAccessor
Gets the IUmbracoContextAccessor
Declaration
protected IUmbracoContextAccessor UmbracoContextAccessor { get; }
Property Value
Type | Description |
---|---|
IUmbracoContextAccessor |
Methods
View SourceFindContent(IPublishedRequestBuilder, String)
Tries to find an Umbraco document for a PublishedRequest
and a route.
Declaration
protected IPublishedContent FindContent(IPublishedRequestBuilder docreq, string route)
Parameters
Type | Name | Description |
---|---|---|
IPublishedRequestBuilder | docreq | |
System.String | route |
Returns
Type | Description |
---|---|
IPublishedContent | The document node, or null. |
TryFindContent(IPublishedRequestBuilder)
Tries to find and assign an Umbraco document to a PublishedRequest
.
Declaration
public virtual 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. |