我正在尝试将按钮添加到自定义列表中。我似乎不可能,下面是我的按钮定义。xml

<CustomAction Id="CopyTasksButton2" Location="CommandUI.Ribbon"
            RegistrationType="List" RegistrationId="10028">
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition
      Location="Ribbon.ListItem.New.Controls._children">
      <Button Id="Ribbon.ListItem.New.Controls.ReplacementButton"
        Command="ReplacementButtonCommand"
        Sequence="25"
        Image32by32="/_layouts/1045/images/formatmap32x32.png" Image32by32Top="-320" Image32by32Left="-384"
        Image16by16="/_layouts/1045/images/formatmap16x16.png" Image16by16Top="-160" Image16by16Left="-192"
        LabelText="Replaced Button"
        TemplateAlias="o2" />
    </CommandUIDefinition>
  </CommandUIDefinitions>
  <CommandUIHandlers>
    <CommandUIHandler
      Command="ReplacementButtonCommand"
      CommandAction="javascript:alert('This button has been replaced.');" />
  </CommandUIHandlers>
</CommandUIExtension>

我从某个教程中获得了此代码。这是 链接文字 一个相似的帖子描述了同样的问题。我尝试将列表定义中的通行费模式从标准更改为常规,但是该按钮仍然不显示。有人知道如何解决吗?

编辑:更奇怪的事情:它在另一个自定义列表上正常工作(我只更改了registrationID)。它们之间的唯一区别是事实,即在部署过程中以编程方式创建了其正常工作的列表。

有帮助吗?

解决方案

问题是事实是,添加自定义操作文件的功能未在我列出的网站上激活。

许可以下: CC-BY-SA归因
scroll top