问题
I would like to create a new module which will have two dropdown menu's in the settings whereby it will get the moduleID of two other modules that is already installed on DNN.
How would I "import" these modules into a new module without having to copy the code? I would like to hide the view of these two modules until someone clicks on a button to show them in a pop-up.
UPDATE
This is the original question of what I would like to achieve: How to show a DNN module in a Fancybox pop up?
回答1:
Here you go. A snippet to get the Portal Modules.
var allModules = DesktopModuleController.GetPortalDesktopModules(PortalId);
foreach (var module in allModules)
{
var moduleInfo = module.Value; //because allModules is a List<KeyValuePair>
Label1.Text += moduleInfo.DesktopModuleID + " - " + moduleInfo.FriendlyName + "<br>";
}
来源:https://stackoverflow.com/questions/54434328/how-can-i-import-an-existing-dnn-module-into-a-new-module-without-copying-the-ex