将功能区按钮关联到子网站的子网站的自定义列表
我有以下站点结构:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否将此部署为农场解决方案?显然,场解决方案存在错误,并且 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