Skip to content

Commit

Permalink
Merge pull request #2162 from hshimanshusharma/users/himanshu/develop1
Browse files Browse the repository at this point in the history
Created GetFriendlyURL method for Manage link of apps of Vanjaro
  • Loading branch information
Manish Kumar authored Apr 5, 2022
2 parents c1129c3 + 4efeb39 commit 2d93bc3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions DesktopModules/Vanjaro/URLManager/Factories/URLFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/// <summary>
/// Returns the first matched slug in the Slugs Array
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions DesktopModules/Vanjaro/URLManager/Managers/URLManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetNuke.Entities.Tabs;

namespace Vanjaro.URL.Managers
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2d93bc3

Please sign in to comment.