Merge pull request #770 from PoisnFang/flexible-index-page-in-custom-modules
Allows page to find Custom Index page in Module from Actions Property
This commit is contained in:
commit
e934a28c39
|
@ -76,7 +76,7 @@
|
|||
User user = null;
|
||||
List<Module> modules;
|
||||
var moduleid = -1;
|
||||
var action = string.Empty;
|
||||
var action = Constants.DefaultAction;
|
||||
var urlparameters = string.Empty;
|
||||
var editmode = false;
|
||||
var reload = Reload.None;
|
||||
|
@ -202,6 +202,7 @@
|
|||
{
|
||||
modIdPos = i + 1;
|
||||
actionPos = modIdPos + 1;
|
||||
// Route to index page if no action is specifed
|
||||
if (actionPos > segments.Length - 1)
|
||||
{
|
||||
action = Constants.DefaultAction;
|
||||
|
@ -459,9 +460,7 @@
|
|||
typename = Constants.ErrorModule;
|
||||
}
|
||||
|
||||
if (module.ModuleId == moduleid && action != "")
|
||||
{
|
||||
// check if the module defines custom routes
|
||||
// check if the module defines custom routes*@
|
||||
if (module.ModuleDefinition.ControlTypeRoutes != "")
|
||||
{
|
||||
foreach (string route in module.ModuleDefinition.ControlTypeRoutes.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
|
@ -473,11 +472,6 @@
|
|||
}
|
||||
}
|
||||
module.ModuleType = typename.Replace(Constants.ActionToken, action);
|
||||
}
|
||||
else
|
||||
{
|
||||
module.ModuleType = typename.Replace(Constants.ActionToken, Constants.DefaultAction);
|
||||
}
|
||||
|
||||
// get additional metadata from IModuleControl interface
|
||||
typename = module.ModuleType;
|
||||
|
|
Loading…
Reference in New Issue
Block a user