How does the Tridion GUI Extension config map the names to the JS file? For example, I am using Jaime’s HelloWorld post with example files. The most important part feels to be the CommandSet section.
<cfg:commandset id="HelloWorldCM.Interface">
<cfg:command name="HelloWorldCM" implementation="Extensions.HW"/>
<cfg:dependencies>
<cfg:dependency>HelloWorldCM.Commandset</cfg:dependency>
</cfg:dependencies>
</cfg:commandset>
Can someone please help me understand the following attributes and how they map to the underlying .js file for the extension?
- name
- implementation
- cfg:dependency
I have tried changing these things in both config and js file but how they are mapped is a mystery.
The three attributes you mention are really all pointers that tie the whole extension together. If you look higher up in the Jamie’s sample, you will see this:
This XML adds a button to the CME’s context menu.
command="HelloWorldCM"refers to the command with the matchingnameattribute in thecommandsetimplementation="Extensions.HW"in the command set actually refers to the namespace in the accompanying HellowWorldCM.js filecfg:dependencypoints to the top of the config file at the<cfg:group name="HelloWorldCM.Commandset" merger="Tridion.Web.UI.Core.Configuration.Resources.CommandGroupProcessor" merge="always">node in order to know which CSS and JS to include.