[英]Sharepoint 2010 Custom Action not appearing
我已經創建了一個自定義動作並將其添加到功能中,但是當我激活該功能時,它並沒有出現在應該顯示的位置,不確定出了什么問題。 代碼如下:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="0b5d3f99-ea17-4a93-ba04-9744a8c099af"
RegistrationType="List"
Title="Developer User Action"
RegistrationId="0x0100f5be96b7d764406681760305e87f90ac"
Sequence="4"
Location="CommandUI.Ribbon.Display">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Actions.Controls._children">
<Button
Id="Ribbon.ListForm.Display.Actions.DeveloperButton"
Command="OpenWebPart"
Image32by32="/_layouts/images/Actinium/Icons-Large/note_edit.png"
Image16by16="/_layouts/images/Actinium/Icons-Small/note_edit.png"
Sequence="4"
LabelText="User/Developer Request"
Description="Back and forth between developer/user to give results of request."
TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="OpenWebPart" CommandAction="javascript:window.open('http://www.google.ca')"></CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
我設法使它正常工作,我對代碼做了一些更改,請參見下文:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="0b5d3f99-ea17-4a93-ba04-9744a8c099af"
RegistrationType="List"
Title="Developer User Action"
RegistrationId="10015"
Sequence="4"
Location="CommandUI.Ribbon.DisplayForm">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Actions.Controls._children">
<Button
Id="Ribbon.ListForm.Display.Actions.DeveloperButton"
Command="OpenWebPart"
Image32by32="/_layouts/images/Masco/Icons-Large/note_edit.png"
Image16by16="/_layouts/images/Masco/Icons-Small/note_edit.png"
Sequence="4"
LabelText="User/Developer Request"
Description="Back and forth between developer/user to give results of request."
TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="OpenWebPart" CommandAction="javascript:window.open('http://www.google.ca')"></CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.