Hi everyone,
Back in the days (say Umbraco v7 I think), I had this partial view to include to help me debug stuff.
It was pretty simple and it just showed all possible routes
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
var routes = RouteTable.Routes;
foreach (var route in routes)
{
var r = (System.Web.Routing.Route)route;
string divider = "Api";
if (r.Url.ToString().Contains(divider))
{
string newR = r.Url.ToString();
string collected = newR.Replace(divider, "<span style='color:white; background-color:Fuchsia;'>" + divider + "</span>");
<h4>@Html.Raw(collected)</h4>
}
else
{
<h4>@r.Url</h4>
}
}
}
Now, trying to make a site in Umbraco v12 I ended up in the very same situation where I needed this partial view. But it doesn't work anymore. I tried Google Fu for a couple of hours but couldn't find anything.
My main problem is where to find RouteTable.Routes. I know that it is in the System.Web.Routing but that isn't a part of my installation I guess (I use the Umbraco Project Template for VS2022 to debug and deploy).
How to find the RouteTable
Hi everyone, Back in the days (say Umbraco v7 I think), I had this partial view to include to help me debug stuff. It was pretty simple and it just showed all possible routes
Now, trying to make a site in Umbraco v12 I ended up in the very same situation where I needed this partial view. But it doesn't work anymore. I tried Google Fu for a couple of hours but couldn't find anything. My main problem is where to find RouteTable.Routes. I know that it is in the System.Web.Routing but that isn't a part of my installation I guess (I use the Umbraco Project Template for VS2022 to debug and deploy).
Anyone?
is working on a reply...