【发布时间】:2012-05-21 09:05:39
【问题描述】:
我为 Tridion 2011 sp1 版本的格式页面实现了功能区工具栏按钮。现在我的要求是将功能区按钮移动到主页 - 编辑组并使其工作。为此,我将 pageid 更改为“FormatPage”,将 groupid 更改为“EditGroup”。它在主页中启用。对于格式页面 RTFfield,我使用了“FaCommand”。主页简单文本字段需要使用哪个命令? 配置。代码:
<ext:extension assignid="EditGroup" pageid="HomePage" name="RTF Extensions">
<ext:group/>
<ext:apply>
<ext:view name="ComponentView">
<ext:control id="ItemToolbar"/>
</ext:view>
</ext:apply>
</ext:extension>
<!-- BUTTONS -->
<ext:extension pageid="HomePage" groupid="EditGroup"
name="Ribbon<br/>Button" assignid="InsertAttribute">
<ext:command>InsertAttribute</ext:command>
<ext:title>Ribbon Button</ext:title>
<ext:dependencies>
<cfg:dependency>InsertAttributeExtension.InsertAttribute.Commands</cfg:dependency>
</ext:dependencies>
<ext:apply>
<ext:view name="ComponentView">
<ext:control id="ItemToolbar"/>
</ext:view>
</ext:apply>
</ext:extension>
我的按钮 javascript:
Type.registerNamespace("RTFExtension.Commands");
RTFExtension.Commands.IA = function Commands$IA(name) {
Type.enableInterface(this, "RTFExtension.Commands.IA");
this.addInterface("Tridion.Cme.Command", [name || "IA"]);
this.addInterface("Tridion.Cme.FaCommand", [name || "IA"]);
};
对于我使用的 FormatPage 和 RTF 字段
FACommand
但是对于简单的文本字段,需要使用哪个命令呢?
请帮助解决这个问题。提前致谢。
【问题讨论】:
标签: tridion tridion-2011