How can I import an existing DNN module into a new module without copying the existing code?

白昼怎懂夜的黑 提交于 2019-12-11 10:46:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!