From f74252af672cedec3892470b5f69714c554170a5 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Fri, 10 May 2013 13:33:21 +0200 Subject: [PATCH] #19467: Adding support for menu items having a url starting with #. Work Item: 19467 --HG-- branch : 1.x --- .../Core/Navigation/Services/NavigationManager.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Orchard.Web/Core/Navigation/Services/NavigationManager.cs b/src/Orchard.Web/Core/Navigation/Services/NavigationManager.cs index 3307d097a..daeaee999 100644 --- a/src/Orchard.Web/Core/Navigation/Services/NavigationManager.cs +++ b/src/Orchard.Web/Core/Navigation/Services/NavigationManager.cs @@ -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; }