Class ContentFinderByUrlAndTemplate
Provides an implementation of IContentFinder that handles page nice URLs and a template.
Namespace: Umbraco.Web.Routing
Assembly: Umbraco.Web.dll
Syntax
public class ContentFinderByUrlAndTemplate : ContentFinderByUrl, IContentFinder
Remarks
This finder allows for an odd routing pattern similar to altTemplate, probably only use case is if there is an alternative mime type template and it should be routable by something like "/hello/world/json" where the JSON template is to be used for the "world" page
Handles /foo/bar/template
where /foo/bar
is the nice URL of a document, and template
a template alias.
If successful, then the template of the document request is also assigned.
Constructors
View SourceContentFinderByUrlAndTemplate(ILogger, IFileService)
Declaration
public ContentFinderByUrlAndTemplate(ILogger logger, IFileService fileService)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | |
IFileService | fileService |
Methods
View SourceTryFindContent(PublishedRequest)
Tries to find and assign an Umbraco document to a PublishedRequest
.
Declaration
public override bool TryFindContent(PublishedRequest frequest)
Parameters
Type | Name | Description |
---|---|---|
PublishedRequest | frequest | The |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether an Umbraco document was found and assigned. |
Remarks
If successful, also assigns the template.