Closed Slipoch closed 4 years ago
Ok, maybe put in a constraint into the example to limit it's routing to the specific controller and not interfere.
Constraint works.
Sounds good! Do you have an example of the constraint you added please?
RouteTable.Routes.MapRoute("[yourPluginName]",
_globalSettings.GetUmbracoMvcArea() + "/backoffice/[yourpluginname]/{controller}/{action}/{id}",
new {
controller = "[yourcontrollername]",
action = "Index",
id = UrlParameter.Optional },
constraints: new { controller="[yourcontrollername]" });
Hi all 👋
It's been a while since I've seen any activity on this one. Sounds like a code snippet that needs to be updated - I know it's been a while, but perhaps you'd still be up for it @Slipoch ? 😄 Let me know.
I've added a PR to include the constraint in the code sample: #2731
This is the page with issues: https://github.com/umbraco/UmbracoDocs/edit/master/Reference/Routing/Authorized/index.md
The C# example on this page seems to cause a break in modelsbuilder as then the modelsbuilder attempts to find the route from your App_Plugin folder rather than it's own.