private int GetOtherModuleDetailTabId(int othermoduleTabId, int dataModuleId)
        {
            //If tab<0 then the data does not come from an other module
            if (othermoduleTabId < 0)
            {
                return(0);
            }

            var moduleInfo = DnnUtils.GetDnnModule(othermoduleTabId, dataModuleId);

            if (moduleInfo == null)
            {
                //This should never happen
                App.Services.Logger.Error($"Module {dataModuleId} not found while in GetOtherModuleDetailTabId()");
                return(0);
            }

            var mainModuleSettings = moduleInfo.OpenContentSettings();

            if (mainModuleSettings == null)
            {
                return(0);
            }
            if (mainModuleSettings.TabId > -1)
            {
                return(0);                               //the other module gets his data also from another module?! Let's not support that.
            }
            return(mainModuleSettings.DetailTabId == -1 ? moduleInfo.TabID : mainModuleSettings.DetailTabId);
        }
        public static OpenContentModuleConfig Create(int moduleId, int tabId, PortalSettings portalSettings)
        {
            var viewModule = DnnUtils.GetDnnModule(tabId, moduleId);

            return(Create(viewModule, portalSettings));
        }