Hi
if I add setting like that in ScaffoldController.cs
private static void GenerateModuleInfo()
{
ModuleInfo moduleInfo = new ModuleInfo();
moduleInfo.ModuleName = "Sample";
moduleInfo.Version = "3.0.1.0";
moduleInfo.KoobooCMSVersion = "3.0.1.0";
moduleInfo.InstallUrl = "~/installer/install";
moduleInfo.UninstallUrl = "~/installer/uninstall";
moduleInfo.DefaultSettings = new ModuleSettings()
{
ThemeName = "Default",
Entry = new Entry()
{
Controller = "Home",
Action = "Index"
}
};
moduleInfo.DefaultSettings.CustomSettings = new Dictionary<string, string>();
moduleInfo.DefaultSettings.CustomSettings["Setting1"] = "Value1";
moduleInfo.DefaultSettings.CustomSettings["Setting2"] = "Value2";
moduleInfo.DefaultSettings.CustomSettings["Setting3"] = "Value3";
moduleInfo.EntryOptions = new EntryOption[]{
new EntryOption(){ Name="NewsList",Entry = new Entry{ Controller="Home",Action ="Index"}},
new EntryOption(){ Name="NewsCategories",Entry = new Entry{ Controller="Home",Action ="Categories"}},
new EntryOption(){Name="ArticleCategories",Entry=new Entry{Controller="Article",Action="Categories"}},
new EntryOption(){Name="ArticleList",Entry=new Entry{Controller="Article",Action="List"}},
};
ModuleInfo.Save(moduleInfo);
}
}
How do I have to display setting on Settings(ie Setting1,Setting2,Setting3) page and be able to modify the value? How should I add the code below in Settings.cshtml?
Thx.
<div class="tab-content" id="settingsInfo">
@Html.ModuleHtml().EditorFor(m => m.Settings)
</div>