I have developed a module that is to be used across several pages within my DNN portal. It shows a list of webinars that one can register for or view depending on whether the webinar has already been recorded, or has not yet happened. All of this functionality works quite well, but I have one issue.
In the settings control for this module, I allow the user to select an existing page within the portal. This page is to be used as the "Detail" page for when a user clicks on the title of a webinar from the list. I was originally using the Settings object, but after much reading, I modified the code to store the url for the detail page in the ModuleSettings object instead. All other settings (for specific instances of the module) are being stored in the TabModuleSettings object. My thought behind this is that I want all instances of the module across the entire portal to use the same detail page, but the other settings should be specific to an instance of the module. For some reason, the detail page selected is not the same across all instances of the module in the portal. Here is the assignment statement that is run when the settings are saved:
-----------------------
modules.UpdateModuleSetting(ModuleId, "WebinarDetailPage", PageDropDownList.SelectedItem.Value);
-----------------------
I was under the assumption that the ModuleSettings object would affect ALL instances of a module, and the TabModuleSettings object would only affect an instance of a module on a specific page.
I currently have two instances of this module on two separate pages. I ran the following query on the DNN database to verify that everything was working correctly:
-----------------------
SELECT *
FROM dnn_ModuleSettings
WHERE SettingName = 'WebinarDetailPage'
-----------------------
This query returned TWO rows instead of one, and each instance of the module has its own unique ModuleID.
Shouldn't the ModuleId be the same across all instances of the module? Is there something that I am missing here?