According to the documentation, it is possible for a GUI extension to have both the model and editor in the same configuration file.
However, I am unable to get this to work.
Here is my Editor.config
file (empty elements removed for brevity):
<?xml version="1.0"?>
<Configuration
xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge"
xmlns:cfg="http://www.sdltridion.com/2009/GUI/Configuration"
xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions"
xmlns:cmenu="http://www.sdltridion.com/2009/GUI/extensions/ContextMenu"
xmlns:edt="http://www.sdltridion.com/2009/GUI/Configuration/Merge">
<resources>
<cfg:groups>
<cfg:group name="Customization.Extension" merge="always">
<cfg:fileset>
<cfg:file type="style">/Client/css/Extension.css</cfg:file>
<cfg:file type="script">/Client/js/ExtensionCommand.js</cfg:file>
<cfg:file type="reference">Customization.Extension.Interface</cfg:file>
</cfg:fileset>
<cfg:dependencies>
<cfg:dependency>Tridion.Web.UI.Editors.CME</cfg:dependency>
<cfg:dependency>Tridion.Web.UI.Editors.CME.commands</cfg:dependency>
<cfg:dependency>Customization.Extension.Services</cfg:dependency>
</cfg:dependencies>
</cfg:group>
<cfg:group name="Customization.Extension.Services" merge="always">
<cfg:domainmodel name="Customization.Extension.Services">
<cfg:fileset/>
<cfg:services>
<cfg:service type="wcf">/Client/Services/MyService.svc</cfg:service>
</cfg:services>
</cfg:domainmodel>
</cfg:group>
</cfg:groups>
</resources>
<definitionfiles />
<extensions>
<ext:editorextensions>
<ext:editorextension target="CME">
<ext:ribbontoolbars>
<ext:add>
<ext:extension pageid="CreatePage" groupid="TargetingGroup" name="Customization Extension" assignid="ExntensionBtn">
<ext:command>Customization.Extension.Interface</ext:command>
<ext:title>Create Thing</ext:title>
<ext:issmallbutton>false</ext:issmallbutton>
<ext:dependencies>
<cfg:dependency>Customization.Extension</cfg:dependency>
</ext:dependencies>
<ext:apply>
<ext:view name="DashboardView">
<ext:control id="DashboardToolbar"/>
</ext:view>
</ext:apply>
</ext:extension>
</ext:add>
</ext:ribbontoolbars>
</ext:editorextension>
</ext:editorextensions>
</extensions>
<commands>
<cfg:commandset id="Customization.Extension.Interface">
<cfg:command name="Customization.Extension.Interface" implementation="Customization.Extension" />
<cfg:dependencies>
<cfg:dependency>Customization.Extension</cfg:dependency>
<cfg:dependency>Customization.Extension.Services</cfg:dependency>
</cfg:dependencies>
</cfg:commandset>
</commands>
</Configuration>
My command is working as I can get it to display "hello" in an alert.
However, when trying to call Customization.Extension.Services.Hello()
(a simple WCF method). I get "Customization" is not defined.
Please note code anonymised to protect the innocent/client.
Anyone got any hints on how to do this?
I have split out my model into a separate project for now but am interested in how this is supposed to work.
<ext:modelextensions>
element that you insert below the<ext:dataextenders>
element?