您可以从计划任务(实现 SchedulerClient 的类)中访问模块快速设置吗?或者有没有办法选择您想检索 ModuleSettings 的模块?
例如:
ActiveModule.ModuleSettings[FeatureController.SETTING_URL]
您可以从计划任务(实现 SchedulerClient 的类)中访问模块快速设置吗?或者有没有办法选择您想检索 ModuleSettings 的模块?
例如:
ActiveModule.ModuleSettings[FeatureController.SETTING_URL]
您可以使用ModuleController
.
using DotNetNuke.Entities.Modules;
//get the module settings with the correct ModuleId and TabId
ModuleInfo mi = ModuleController.Instance.GetModule(ModuleId, TabId, false);
//change some settings
mi.ModuleTitle = "New Module Title";
//save the new module settings
ModuleController.Instance.UpdateModule(mi);
更新
您可以像这样获得所有选项卡或模块
//get all tabs in the portal
var tabs = TabController.GetPortalTabs(PortalId, 0, true, false);
//get all modules in the portal
var modules = ModuleController.Instance.GetModules(PortalId);
//loop all individual modules
foreach (ModuleInfo module in modules)
{
Label1.Text += module.ModuleTitle + "<br>";
}