diff --git a/DesktopModules/Vanjaro/URLManager/Factories/URLFactory.cs b/DesktopModules/Vanjaro/URLManager/Factories/URLFactory.cs index 0dab0cb88..462e687b7 100644 --- a/DesktopModules/Vanjaro/URLManager/Factories/URLFactory.cs +++ b/DesktopModules/Vanjaro/URLManager/Factories/URLFactory.cs @@ -68,6 +68,17 @@ public static URLEntity GetURL(int ModuleID, string Slug, int PortalID) return null; } + public static string GetFriendlyURL(PortalSettings PortalSettings, TabInfo tabInfo, int ModuleID, string QueryParameter) + { + string URL = "~/Default.aspx"; + URL += "?TabId=" + tabInfo.TabID; + if (!string.IsNullOrEmpty(PortalSettings.CultureCode)) + URL += "&language=" + PortalSettings.CultureCode; + if (!string.IsNullOrEmpty(QueryParameter)) + URL += "&" + QueryParameter; + return FriendlyUrlProvider.Instance().FriendlyUrl(tabInfo, URL); + } + /// /// Returns the first matched slug in the Slugs Array /// diff --git a/DesktopModules/Vanjaro/URLManager/Managers/URLManager.cs b/DesktopModules/Vanjaro/URLManager/Managers/URLManager.cs index ec7b15eb8..87892aba3 100644 --- a/DesktopModules/Vanjaro/URLManager/Managers/URLManager.cs +++ b/DesktopModules/Vanjaro/URLManager/Managers/URLManager.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using DotNetNuke.Entities.Tabs; namespace Vanjaro.URL.Managers { @@ -139,6 +140,11 @@ public static int GetSlugTabID(string[] urlParms, ref string Slug, int TabID, Po return URLFactory.GetSlugTabID(urlParms, ref Slug, TabID, Pi); } + public static string GetFriendlyURL(PortalSettings PortalSettings, TabInfo tabInfo, int ModuleID, string QueryParameter) + { + return URLFactory.GetFriendlyURL(PortalSettings, tabInfo, ModuleID, QueryParameter); + } + public static string GetFriendlyURL(PortalSettings pS, URLEntity urlEntity) { return GetFriendlyURL(urlEntity.ModuleID, pS, urlEntity.Slug, null, urlEntity.Language, urlEntity.PageName);