Replace querystring routes with conventional routes

This commit is contained in:
Shaun Walker
2019-07-29 21:45:08 -04:00
parent 1c0d2de9fe
commit 32a2d164c3
2 changed files with 292 additions and 273 deletions

View File

@ -44,14 +44,19 @@ namespace Oqtane.Shared
public static string EditUrl(PageState pagestate, Module modulestate, string action, string parameters)
{
string url = pagestate.Alias.Path + "/" + pagestate.Page.Path + "?mid=" + modulestate.ModuleId.ToString();
string url = pagestate.Alias.Path;
if (pagestate.Page.Path != "")
{
url += "/" + pagestate.Page.Path;
}
url += "/" + modulestate.ModuleId.ToString();
if (action != "")
{
url += "&ctl=" + action;
url += "/" + action;
}
if (!string.IsNullOrEmpty(parameters))
{
url += "&" + parameters;
url += "?" + parameters;
}
return url;
}