By default in Umbraco 8, selecting a different template by adding a template alias to the end of the URL isn't enabled. You can enable it as described here. Without that change, when you request https://localhost:xxxxx/blog/test it's just looking for a page with that URL and can't find one, so you get a 404.
The routing by template for custom controllers is talking about routing based on the template assigned to the page, rather than changing the template based on the URL. If you change the template of the Blog page to Test, you should find that https://localhost:xxxxx/blog/ will use your Test action.
Thanks for your reply, it helped me fixing the problem! After adding the contentfinder "ContentFinderByUrlAndTemplate" to my composer the template routing worked like as in Umbraco 7.
Routing via template not working in Umbraco 8
Hi,
In Umbraco 7 i used template routing to do a custom action to create another overview.
In Umbraco 8 i can't get this to work. I followed the instructions in https://our.umbraco.com/Documentation/Reference/Routing/custom-controllers#routing-via-template. But instead of hitting the contoller action, a 404 page is displayed. I tried it with a the Umbraco 8 Staterkit and used the folllow class:
Then i've added a template to the documenttype Blog with the name "Test".
When i do the same with Umbraco 7.15.3, the test-action is hit when i use https://localhost:xxxxx/blog/test
Has this been changed to Umbraco 8 or is this a bug?
Best regards,
iNETZO
By default in Umbraco 8, selecting a different template by adding a template alias to the end of the URL isn't enabled. You can enable it as described here. Without that change, when you request https://localhost:xxxxx/blog/test it's just looking for a page with that URL and can't find one, so you get a 404.
The routing by template for custom controllers is talking about routing based on the template assigned to the page, rather than changing the template based on the URL. If you change the template of the Blog page to Test, you should find that https://localhost:xxxxx/blog/ will use your Test action.
Hi Steve,
Thanks for your reply, it helped me fixing the problem! After adding the contentfinder "ContentFinderByUrlAndTemplate" to my composer the template routing worked like as in Umbraco 7.
Best regards,
iNETZO
is working on a reply...