Accessing settings from modules

Topics: Customizing Orchard, Troubleshooting
Jul 21, 2011 at 4:24 PM

Hi, I'm quite new to Orchard so sorry if this seems like a no brainer to some of you, but I was wondering if there was a way to access settings from different modules. Basically, I have created a new module in Orchard which is solely used to add new settings to the Settings menu. It contains a ContentPart, a ContentPartRecord, an AdminMenu class to place it in the settings and an AdminController and view to display it. I now want to be able to access the data from these settings in different modules. I have seen examples of where you can create a new setting and access it's data from the same module but not different ones. Any help would be appreciated :)

Jul 21, 2011 at 6:36 PM

Settings are usually additional parts on the Site content item. So if you know how to get the settings from your own module, you should be able to do As<IOtherSettingsPart>() on that object.