Custom Settings and global issue

David Tan asked on April 15, 2014 10:00

Hi,

I'm having a little problem with the Custom Settings. I have 4 websites with their own custom settings. However, it seems like it keeps looking for the global custom settings even though it is NOT checked as "Inherit from global settings".

David

Correct Answer

David Tan answered on April 15, 2014 11:41

Problem fixed. I had to specify the context otherwise it gets the value from the global custom settings.

Before : SettingsKeyProvider.GetStringValue("GoogleMapStyle")

After : SettingsKeyProvider.GetStringValue(CMSContext.CurrentSiteName + ".GoogleMapStyle")

3 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.