0
winson created
I need to dynamic to generate the URL with URL route, because I need to handle the root or subfolder deployment issue, so I want to generate url like below:
UrlHelper url = new UrlHelper(HttpContext.Current.Request.RequestContext);
var menuUrl= url.RouteUrl(new { Controller = "Home", Action = "Index" });
new MenuItemDefinition(
"Home",
new FixedLocalizableString("Home"),
url: menuUrl,
icon: "fa fa-home",
UserRole.JOURNALIST
)
but it's can't get the HttpContext.Current.Request.RequestContext in NavigationProvider class, so any ideas?
Thanks!