Search Results for

    Show / Hide Table of Contents
    View Source

    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 Source

    ContentFinderByUrl(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 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
    System.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<System.Boolean>

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

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • ContentFinderByUrl(ILogger<ContentFinderByUrl>, IUmbracoContextAccessor)
    • Properties
      • UmbracoContextAccessor
    • Methods
      • FindContent(IPublishedRequestBuilder, String)
      • TryFindContent(IPublishedRequestBuilder)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX