#19467: Adding support for menu items having a url starting with #.

Work Item: 19467

--HG--
branch : 1.x
This commit is contained in:
Sipke Schoorstra
2013-05-10 13:33:21 +02:00
parent 7676b605ae
commit f74252af67

View File

@@ -87,10 +87,12 @@ namespace Orchard.Core.Navigation.Services {
if (url.StartsWith("~/")) {
url = url.Substring(2);
}
var appPath = _urlHelper.RequestContext.HttpContext.Request.ApplicationPath;
if (appPath == "/")
appPath = "";
url = string.Format("{0}/{1}", appPath, url);
if (!url.StartsWith("#")) {
var appPath = _urlHelper.RequestContext.HttpContext.Request.ApplicationPath;
if (appPath == "/")
appPath = "";
url = string.Format("{0}/{1}", appPath, url);
}
}
return url;
}