Reputation: 13
I need to add custom menu to list menu toolbar. I wrote elements.xml
as shown below:
<CustomAction
Id="SiteActionsToolbar"
RegistrationType="ContentType"
RegistrationId="0x01"
Location="ViewToolbar"
Title="Upload"
Sequence="0"
Description="Upload file ti file system">
<UrlAction Url="SitePages/UploadFile.aspx?ListId={ListId}"/>
</CustomAction>
My custom menu appears and works fine. But the requirement is set displaying order of this menu after "new" menu before "action" menu.
Is it possible to do this in sharepoint without using Javascript?
Upvotes: 1
Views: 492
Reputation: 298
You need to define the location using below tags:
<CommandUIExtension><CommandUIDefinitions> <CommandUIDefinition Location="Ribbon.Documents.New.Controls._children">...
You can change the location by replacing the "New" with your section.
General entries will be "New", "Manage", "copies", "workflows"
The line Ribbon.Documents.New.Controls._children says to sharepoint in which section to place your custom button.
Upvotes: 2