In older versions of Umbraco if you had a root template that wasn't attached to a document type you could access that template as a page by calling it's name as the page URL.
Does this functionality still work in Umbraco 8.1.1? I've converted over a general template we use to create a sitemap but it's giving a not found error. I'm not sure whether I've just missed something or this is no longer available in v8.
You now control how the content finders work yourself with your own composer like this:
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Web.Routing;
namespace MyProject.Web.Compose
{
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
public class ContentFinderComposer : IUserComposer
{
public void Compose(Composition composition)
{
//clear the collection
composition.WithCollectionBuilder<ContentFinderCollectionBuilder>().Clear();
//add them back in the right order
composition.WithCollectionBuilder<ContentFinderCollectionBuilder>()
.Append<ContentFinderByPageIdQuery>()
.Append<ContentFinderByUrl>()
.Append<ContentFinderByIdPath>()
//add the url and template one back in here
.Append<ContentFinderByUrlAndTemplate>()
.Append<ContentFinderByUrlAlias>()
.Append<ContentFinderByRedirectUrl>();
}
}
}
It's also lead me to take a look at the pipeline docs and reminded me of a few things that could end up causing some un-expected behaviour due to some changes we've made to our setup.
Templates without Document Type
In older versions of Umbraco if you had a root template that wasn't attached to a document type you could access that template as a page by calling it's name as the page URL.
Does this functionality still work in Umbraco 8.1.1? I've converted over a general template we use to create a sitemap but it's giving a not found error. I'm not sure whether I've just missed something or this is no longer available in v8.
Hi Suzy
The 404handlers.config was removed
You now control how the content finders work yourself with your own composer like this:
I just tested it and it works for me.
Thanks, that saved me a massive headache.
It's also lead me to take a look at the pipeline docs and reminded me of a few things that could end up causing some un-expected behaviour due to some changes we've made to our setup.
No problem, glad i could help
is working on a reply...