Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to lock down the best practise when it comes to setting up a custom controller and routes and rendering views that are completely outside of Umbraco and its content.
Basically this part of the application isn't based off any content nodes, or at the very most based off a single "dashboard" node that has subpages that don't need to exist in Umbraco.
The simplest example in the docs would be to use UmbracoVirtualNodeByIdRouteHandler to provide the ID of this 'dashboard' node, but could I use this real node for every single route I'm making?
If that won't work, would I need to create my own implementation of UmbracoVirtualNodeRouteHandler that yields 'fake' IPublishedContent instances per route? I suspect that is what the custom routes docs are saying but I'm unsure without a solid example to look at.
Would appreciate if anyone had any examples or input.
So without testing (yet), it seems something like the accepted answer here is the way to go: https://stackoverflow.com/questions/35647220/how-to-create-a-virtual-node-in-umbraco
This was surprisingly unintuitive without an example to work with, though maybe its just me.
Have you considered setting up a new Area (as in a 'MVC area': right click on your project > Add > Area...) for your custom controllers and views? If they really are outside of the Umbraco context then it should be just plain MVC for you whilst in that area. The routing that gets set up by MVC when you create the area should work without needing to configure anything in Umbraco, as far as I can remember from when I last did this.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted