Ok here is my updated code - still not working. I'm not getting any errors (that I am aware of) - but the module is still not getting added to the page, and frankly I'm lost- and frustrated.
I would so appreciate some help if anyone can can spare the time.
[
WebMethod(Description = "Creates a new page")]public int CreatePage(string pageName, string content, string lang)TabController controller = new DotNetNuke.Entities.Tabs.TabController();TabInfo newTab = new DotNetNuke.Entities.Tabs.TabInfo();false;false;true;false;"";"";int newTabId = controller.AddTab(newTab); //add new page.
// clear cache
DataCache.ClearModuleCache(newTab.TabID);///Add module to newTab
DotNetNuke.Entities.Modules.
DotNetNuke.Entities.Modules.
modInfo.DisplayTitle =
modInfo.Header =
ModuleInfo modInfo = new DotNetNuke.Entities.Modules.ModuleInfo();ModuleController mc = new DotNetNuke.Entities.Modules.ModuleController();true;"header string";//modInfo.IsDefaultModule = true;//do we need this?
modInfo.Alignment =
modInfo.TabID = newTabId;
"ContentPane";//modInfo.DesktopModuleID = 68; //HTML text module
//modInfo.ModuleID = 68;
modInfo.PortalID = 0;
modInfo.EndDate = System.
modInfo.InheritViewPermissions =
modInfo.IsDefaultModule =
modInfo.ModuleOrder = 1;
modInfo.AllTabs =
modInfo.PaneName =
modInfo = mc.GetModuleByDefinition(0,
DateTime.Now.AddYears(10);true;true;false;"ContentPane";"Text/HTML"); int newModule=mc.AddModule(modInfo); //add module to the page
// clear cache
}
DataCache.ClearModuleCache(newTab.TabID);return newTabId;
{
DotNetNuke.Entities.Tabs.
DotNetNuke.Entities.Tabs.
newTab.PortalID = 0;
newTab.TabName = pageName;
newTab.Title = pageName;
newTab.Description = pageName;
newTab.KeyWords = pageName;
newTab.IsDeleted =
newTab.IsSuperTab =
newTab.IsVisible =
newTab.DisableLink =
newTab.IconFile =
newTab.Url =