Last active
April 29, 2016 08:17
-
-
Save daniiiol/1918805a46a2a4e24a7e93bdca0acc1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Sitecore.Shell.Applications.ContentEditor; | |
namespace CustomCode.Common.Fields | |
{ | |
public class AdditionalMultilist : MultilistEx | |
{ | |
private const string Setting = "setting="; | |
public new string Source | |
{ | |
get | |
{ | |
return base.Source; | |
} | |
set | |
{ | |
if (!string.IsNullOrEmpty(value) && | |
value.StartsWith(Setting, StringComparison.InvariantCultureIgnoreCase)) | |
{ | |
var setting = value.Substring(Setting.Length, value.Length -Setting.Length); | |
base.Source = Sitecore.Configuration.Settings.GetSetting(setting); | |
} | |
else | |
{ | |
base.Source = value; | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<sitecore> | |
<settings> | |
<setting name="MySetting.HomePath" value="/sitecore/content/client1/Home" /> | |
</settings> | |
</sitecore> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment