Skip to content

Instantly share code, notes, and snippets.

@maxali
Created March 11, 2016 02:26
Show Gist options
  • Save maxali/716876b078d02e718257 to your computer and use it in GitHub Desktop.
Save maxali/716876b078d02e718257 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="dc08391a-82b7-44c6-b81b-5a093da0c978.RibbonCustomAction1"
RegistrationType="List"
RegistrationId="101"
Location="CommandUI.Ribbon"
Sequence="10001"
HostWebDialog="true"
HostWebDialogHeight="500"
HostWebDialogWidth="1000">
<UrlAction Url=""/>
<CommandUIExtension>
<!--
Update the UI definitions below with the controls and the command actions
that you want to enable for the custom action.
-->
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.Documents.New.Controls._children">
<Button Id="Ribbon.Documents.New.Controls.TemplateSelectorButton"
Alt="Select template"
Sequence="13"
Command="ShowSelectorCommand"
LabelText="New from Template"
TemplateAlias="o1"
Image32by32="_layouts/1033/Images/formatmap16x16.png"
Image16by16="_layouts/1033/Images/formatmap32x32.png" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="ShowSelectorCommand"
CommandAction="~appWebUrl/Pages/Selector.html?{StandardTokens}&amp;SPListItemId={SelectedItemId}&amp;SPListId={SelectedListId}&amp;DisplayType=iframe" />
</CommandUIHandlers>
</CommandUIExtension >
</CustomAction>
</Elements>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment