我已成功向我的网站添加了自定义功能区按钮,并且所有内容都按预期显示。但是,当我转到子站点时,我的自定义功能区按钮不显示。我怎样才能让我的按钮显示在主站点和子站点?我认为部署到主站点的按钮也会转移到子站点,但我想不是这种情况。任何人有任何想法或指导?我的按钮被添加到RTE的“插入”选项卡的“媒体”组中。自定义功能区按钮不会显示在子网站上
哦,我正在部署一个“网站”范围功能。
这里是我的按钮代码:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="CommandUI.Ribbon.EditingTools.MyCompany_InsertVideoButton"
Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.EditingTools.CPInsert.Media.Controls._children">
<Button
Id="Ribbon.EditingTools.CPInsert.Media.Controls.MyCompany_InsertVideoButton"
ToolTipTitle="Video"
ToolTipDescription="Insert a video into the page."
Sequence="50"
LabelText="Insert Video"
Image16by16="/_layouts/MyCompany/images/icons/ribbonInsertVideoButton_16.png"
Image32by32="/_layouts/MyCompany/images/icons/ribbonInsertVideoButton_32.png"
Command="MyCompany_InsertVideoButtonCommand"
TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="MyCompany_InsertVideoButtonCommand"
CommandAction="javascript:alert('MyCompanyInsertVideoButton clicked!');"
/>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
除非我误解了我对SharePoint的理解,否则将“网站”功能部署到整个“网站集”,因此这也会影响子网站。我们的“Web”范围功能仅适用于单个网站,因此不会影响子网站。我不确定Web应用程序作用域功能甚至会允许我更改该Web应用程序中的网站的功能区。但我猜想尝试它并不会有什么坏处。我几乎想到我只是在运行时通过我的母版页添加它,但这似乎可能会增加不必要的开销,因为我应该可以使用该功能。 – TehOne 2011-05-24 22:07:17