Example #1
0
        public override Boolean IsIndexingAllowedForModule(DotNetNuke.Entities.Modules.ModuleInfo objModule)
        {
            DotNetNuke.Entities.Tabs.TabController objTabController = new DotNetNuke.Entities.Tabs.TabController();
            Hashtable tabSettings = objTabController.GetTabSettings(objModule.TabID);

            if (!tabSettings.Contains("AllowIndex") || tabSettings["AllowIndex"].ToString().ToLowerInvariant() == "true")
            {
                // Check if indexing is disabled for the current module
                DotNetNuke.Entities.Modules.ModuleController objModuleController = new DotNetNuke.Entities.Modules.ModuleController();
                Hashtable tabModuleSettings = objModuleController.GetTabModuleSettings(objModule.TabModuleID);
                return(!tabModuleSettings.Contains("AllowIndex") || tabModuleSettings["AllowIndex"].ToString().ToLowerInvariant() == "true");
            }
            else
            {
                return(false);
            }
        }