将功能区按钮关联到子网站的子网站的自定义列表

发布于 2024-10-10 01:54:15 字数 1338 浏览 0 评论 0原文

我有以下站点结构:

TOP
-- Nodes
---- Node 1
---- Node 2
---- Node 3
................
................
---- Node n 

节点站点(节点 1、节点 2、...节点 n) 的所有子站点都有一个自定义列表:节点列表< /strong>

我正在尝试将自定义功能区按钮添加到网站节点所有子网站的节点列表中。

当我部署以下自定义操作描述时,我看不到功能区按钮。我确信我错过了一些东西。

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <CustomAction Id="NG.Import.ImportAction"
        Location="CommandUI.Ribbon.ListView"
        Sequence="0"
        Title="Data Import"
        RegistrationId="{$ListId:Lists/Node List;}"
        RegistrationType="List">
  <CommandUIExtension>
   <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
     <Button Id="NG.Import.ImportButton"
         Alt="Data Import"
         Sequence="0"
         LabelText="Data Import"
         Image32by32="_images/NG.Import/excel32.png"
         Image16by16="_images/NG.Import/excel16.png"
         Command="javascript:alert('Hello World!')" />
    </CommandUIDefinition>
   </CommandUIDefinitions>
  </CommandUIExtension>
 </CustomAction>
</Elements>

I have the following site structure:

TOP
-- Nodes
---- Node 1
---- Node 2
---- Node 3
................
................
---- Node n 

All subsites of Nodes site (Node 1, Node 2, ... Node n) has a custom list: Node List

I am trying to add a custom Ribbon Button to the Node List of all subsites of the site Nodes.

When I deploy the following custom action description, I do not see the ribbon button. I am sure I am missing something.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <CustomAction Id="NG.Import.ImportAction"
        Location="CommandUI.Ribbon.ListView"
        Sequence="0"
        Title="Data Import"
        RegistrationId="{$ListId:Lists/Node List;}"
        RegistrationType="List">
  <CommandUIExtension>
   <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
     <Button Id="NG.Import.ImportButton"
         Alt="Data Import"
         Sequence="0"
         LabelText="Data Import"
         Image32by32="_images/NG.Import/excel32.png"
         Image16by16="_images/NG.Import/excel16.png"
         Command="javascript:alert('Hello World!')" />
    </CommandUIDefinition>
   </CommandUIDefinitions>
  </CommandUIExtension>
 </CustomAction>
</Elements>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

—━☆沉默づ 2024-10-17 01:54:15

您是否将此部署为农场解决方案?显然,场解决方案存在错误,并且 RegistrationId="{$ListId:Lists/Node List;}" 语法仅适用于沙箱解决方案。

http://social.msdn .microsoft.com/Forums/en-US/sharepoint2010programming/thread/a93cde77-0d3c-4087-aee4-0f5a46aaf636

Are you deploying this as a farm solution? Apparently there is a bug with farm solutions, and the RegistrationId="{$ListId:Lists/Node List;}" syntax only works with sandbox solutions.

http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010programming/thread/a93cde77-0d3c-4087-aee4-0f5a46aaf636

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文