Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentFinderByUrlNew

    Provides an implementation of IContentFinder that handles page nice URLs.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Routing
    Assembly: Umbraco.Core.dll
    Syntax
    public class ContentFinderByUrlNew : IContentFinder
    Remarks

    Handles /foo/bar where /foo/bar is the nice URL of a document.

    Constructors

    View Source

    ContentFinderByUrlNew(ILogger<ContentFinderByUrlNew>, IUmbracoContextAccessor, IDocumentUrlService, IPublishedContentCache)

    Initializes a new instance of the ContentFinderByUrl class.

    Declaration
    [Obsolete("Please use the constructor with all parameters. Scheduled for removal in Umbraco 18.")]
    public ContentFinderByUrlNew(ILogger<ContentFinderByUrlNew> logger, IUmbracoContextAccessor umbracoContextAccessor, IDocumentUrlService documentUrlService, IPublishedContentCache publishedContentCache)
    Parameters
    Type Name Description
    ILogger<ContentFinderByUrlNew> logger
    IUmbracoContextAccessor umbracoContextAccessor
    IDocumentUrlService documentUrlService
    IPublishedContentCache publishedContentCache
    View Source

    ContentFinderByUrlNew(ILogger<ContentFinderByUrlNew>, IUmbracoContextAccessor, IDocumentUrlService, IPublishedContentCache, IOptionsMonitor<WebRoutingSettings>)

    Initializes a new instance of the ContentFinderByUrl class.

    Declaration
    public ContentFinderByUrlNew(ILogger<ContentFinderByUrlNew> logger, IUmbracoContextAccessor umbracoContextAccessor, IDocumentUrlService documentUrlService, IPublishedContentCache publishedContentCache, IOptionsMonitor<WebRoutingSettings> webRoutingSettings)
    Parameters
    Type Name Description
    ILogger<ContentFinderByUrlNew> logger
    IUmbracoContextAccessor umbracoContextAccessor
    IDocumentUrlService documentUrlService
    IPublishedContentCache publishedContentCache
    IOptionsMonitor<WebRoutingSettings> webRoutingSettings

    Properties

    View Source

    UmbracoContextAccessor

    Gets the IUmbracoContextAccessor.

    Declaration
    protected IUmbracoContextAccessor UmbracoContextAccessor { get; }
    Property Value
    Type Description
    IUmbracoContextAccessor

    Methods

    View Source

    FindContent(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
    string route
    Returns
    Type Description
    IPublishedContent

    The document node, or null.

    View Source

    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 PublishedRequest.

    Returns
    Type Description
    Task<bool>

    A value indicating whether an Umbraco document was found and assigned.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX