Best way to store tiny amount of data?

Topics: Writing modules
Feb 16, 2012 at 10:31 AM

Hi All, I’m creating a module to handle paypal operations and would like to incorporate the ability to change settings ‘seller / buyer account’ via the dashboard. So I’ve added an AdminMenu.cs with associated controller and view, though was wondering what approach I should take to storing such aforementioned data; it really isn’t a lot - I mean, two email addresses hardly seem worth going down the migration/table route [I'm sure other things may come, however], or is it? Any thoughts suggestions are greatly appreciated, Thanks Dyr

Coordinator
Feb 16, 2012 at 7:38 PM

Extend site settings with a custom part.

Feb 17, 2012 at 1:11 AM
Edited Feb 17, 2012 at 1:13 AM

Thanks bertrandleroy, I will look into it...Say I have such up and running, would there then be a nice way to retrieve these settings for use in views -- for e.g. along the lines of:

System.Configuration.ConfigurationManager.AppSettings["PayPalSellerEmail"]  ?  Cheers Dyr

Coordinator
Feb 17, 2012 at 1:21 AM

WorkContext.CurrentSite.As<YourPart>().SomeProperty

Feb 17, 2012 at 2:04 AM

Wow! I followed this guide:

http://docs.orchardproject.net/Documentation/Adding-custom-settings

and all is up and running, love it! Cheers for steering me in the right direction *again*.