Class ContentFinderByPageIdQuery
This looks up a document by checking for the umbPageId of a request/query string
Inheritance
System.Object
      Namespace: Umbraco.Cms.Core.Routing
Assembly: Umbraco.Core.dll
Syntax
public class ContentFinderByPageIdQuery : IContentFinderRemarks
This is used by library.RenderTemplate and also some of the macro rendering functionality like in macroResultWrapper.aspx
Constructors
View SourceContentFinderByPageIdQuery(IRequestAccessor, IUmbracoContextAccessor)
Initializes a new instance of the ContentFinderByPageIdQuery class.
Declaration
public ContentFinderByPageIdQuery(IRequestAccessor requestAccessor, IUmbracoContextAccessor umbracoContextAccessor)Parameters
| Type | Name | Description | 
|---|---|---|
| IRequestAccessor | requestAccessor | |
| IUmbracoContextAccessor | umbracoContextAccessor | 
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 | 
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.