6

I implemented a Ribbon tool bar button for Format page of Tridion 2011 sp1 version. Now my requirement is to move the Ribbon button to Home page - Edit Group and make it work. For that I changed pageid to "FormatPage" and groupid to "EditGroup". It is enabled in home page. For Format page RTFfield I used "FaCommand". For Home page simple text field which command need to be used? Config. Code:

<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&lt;br/&gt;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>

My button 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"]);
};

For FormatPage and RTF field I used

FACommand

But for simple text field which command need to be used?
Please help in this issue. Thanks in advance.

4

1 回答 1

1

我通常使用 firebug 在 tridion 对话框的 html 源中查找特定组的 PageId。HomePage 似乎是正确的。我还想如果该值为空白,这就是按钮将显示的位置。

如果这在短期内没有帮助,我将很快用一个解决方案更新这个答案。

于 2012-05-21T19:58:25.327 回答