如何在不复制现有代码的情况下将现有DNN模块导入新模块? [英] How can I import an existing DNN module into a new module without copying the existing code?

查看:90
本文介绍了如何在不复制现有代码的情况下将现有DNN模块导入新模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个 new 模块,该模块的设置中将有两个下拉菜单,它将获得DNN上已经安装的其他两个模块的 moduleID

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.

更新

这是我想要实现的原始问题: 如何在Fancybox弹出窗口中显示DNN模块上吗?

This is the original question of what I would like to achieve: How to show a DNN module in a Fancybox pop up?

推荐答案

在这里.获取门户模块的代码段.

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>";
}

这篇关于如何在不复制现有代码的情况下将现有DNN模块导入新模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆