我为Tridion 2011 sp1版本的Format页面实现了一个Ribbon工具栏按钮。现在我的要求是将功能区按钮移动到主页 - 编辑组并使其工作。为此,我将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
但是对于需要使用哪个命令的简单文本字段? 请帮忙解决这个问题。提前谢谢。
答案 0 :(得分:1)
我通常使用firebug在tridion对话框的html源代码中查找特定组的PageId。 HomePage似乎没错。我也想过如果值是空白的,这就是按钮显示的位置。
如果短期内没有帮助,我会尽快用解决方案更新这个答案。