Tridion GUI 扩展配置如何将名称映射到 JS 文件?例如,我正在使用 Jaime 的你好世界帖子 http://jaimesantosalcon.blogspot.com/2011/02/sdl-tridion-2011-ga-gui-extension-hello.html与示例文件。最重要的部分感觉是 CommandSet 部分。
<cfg:commandset id="HelloWorldCM.Interface">
<cfg:command name="HelloWorldCM" implementation="Extensions.HW"/>
<cfg:dependencies>
<cfg:dependency>HelloWorldCM.Commandset</cfg:dependency>
</cfg:dependencies>
</cfg:commandset>
有人可以帮助我了解以下属性以及它们如何映射到扩展的底层 .js 文件吗?
我尝试过在配置和 js 文件中更改这些内容,但它们如何映射是一个谜。
您提到的三个属性实际上都是将整个扩展联系在一起的指针。如果您在 Jamie 的示例中向上查看,您会看到以下内容:
<ext:contextmenus>
<ext:add>
<ext:extension name="HelloWorldCMExtension" assignid="" insertbefore="cm_refresh">
<ext:menudeclaration>
<cmenu:ContextMenuItem id="ext_HelloWorldCM" name="Hello World!" command="HelloWorldCM"/>
</ext:menudeclaration>
<ext:dependencies>
<cfg:dependency>HelloWorldCM.Example</cfg:dependency>
</ext:dependencies>
<ext:apply>
<ext:view name="DashboardView"/>
</ext:apply>
</ext:extension>
</ext:add>
</ext:contextmenus>
此 XML 向 CME 的上下文菜单添加一个按钮。
command="HelloWorldCM"
指的是匹配的命令name
属性中的commandset
implementation="Extensions.HW"
命令集中的名称空间实际上指的是随附的 HellowWorldCM.js 文件中的名称空间
cfg:dependency
指向配置文件的顶部<cfg:group name="HelloWorldCM.Commandset" merger="Tridion.Web.UI.Core.Configuration.Resources.CommandGroupProcessor" merge="always">
节点以便知道要包含哪些 CSS 和 JS。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)