开发者

Access sitecore settings programmatically (Sitecore 6)

开发者 https://www.devze.com 2022-12-22 01:13 出处:网络
Is there a way to get to sitecore settings through code. The specific setting I\'m interested in is the data开发者_开发技巧 Folder path. If you\'d like to get other settings, you may want to try:-

Is there a way to get to sitecore settings through code.

The specific setting I'm interested in is the data开发者_开发技巧 Folder path.


If you'd like to get other settings, you may want to try:-

Sitecore.Configuration.Settings.GetSetting("SettingName");

This will work for all sitecore settings, even your custom settings that can be added through the config files in the App_config/Include.


Yes. Look at the Sitecore.Configuration.Settings class (which is your entry point to the Sitecore settings), and use the static DataFolder property:

string dataFolder = Sitecore.Configuration.Settings.DataFolder;
0

精彩评论

暂无评论...
验证码 换一张
取 消