I do not know that it is used for a data expander, but I am reading the user configuration from the model configuration using the following code:
using System.Xml; using Tridion.Web.UI; using Tridion.Web.UI.Core; namespace Custom.Model { public class Configuration { public static string GetConfigString(string configItem) { XmlDocument customConfiguration = ConfigurationManager.Models["Custom.Model"].CustomXml; XmlNamespaceManager ns = new XmlNamespaceManager(new NameTable()); ns.AddNamespace("c", Constants.EDITOR_CONFIG_NAMESPACE); XmlNode node = customConfiguration.SelectSingleNode("//c:customconfiguration/c:clientconfiguration/c:" + configItem, ns); string configValue = node != null ? node.InnerText : ""; return configValue; } } }
Instead of using ConfigurationManager.Models, you can use ConfigurationManager.Editors to go to the configuration of your editor. You refer to a model or editor by the name specified in System.config, where you enable the extension, for example. CME as defined in the example below.
<editor name="CME"> <installpath>C:\Program Files (x86)\Tridion\web\WebUI\Editors\CME\</installpath> <configuration>Configuration\CME.config</configuration> <vdir>CME</vdir> </editor>
source share