Forum Discussion
Sergio Ortega Martín
Oct 06, 2017Copper Contributor
Add Custom Command Bar in Button "New" of Modern Page of Team Site
I need to add a custom action in the available actions when clicking on the "New" button of a modern page, is it possible ?
I had thought that maybe it could be done using a SharePoint Framework Extension of type "ListView Command Set" and configuring the "RegistrationType = Web" property:
<CustomAction
Title = "SPFxListViewCommandSet"
RegistrationId = "100"
RegistrationType = "List"
Location = "ClientSideExtension.ListViewCommandSet.CommandBar"
ClientSideComponentId = "..."
ClientSideComponentProperties = "...">
</ CustomAction>
Any ideas will be welcome.
Thank you!
4 Replies
Sort By
- Velin GeorgievCopper Contributor
Modern pages are currently not supported.
You can add commands in the list views on the following locations:
Location: Where the commands are displayed. The possible values are:
- ClientSideExtension.ListViewCommandSet.ContextMenu: The context menu of the item(s)
- ClientSideExtension.ListViewCommandSet.CommandBar: The top command set menu in a list or library
- ClientSideExtension.ListViewCommandSet: Both the context menu and the command bar (Corresponds to SPUserCustomAction.Location="CommandUI.Ribbon")
or use applications customizer to create similar experience. The button would not be positioned on that drop down, but instead in the `top` bar. Corresponding custom action location is `ClientSideExtension.ApplicationCustomizer`
- MikeWalkerCopper Contributor
Quick question Is there a way to create a Drop down command bar on the top command set?
Thanks in advance
- Anonymous
That xml was for the classic pages in the new modern sites it works different you can check it here https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api
- Djavan ROACopper Contributor
Hi,
I'm not sure you can actualy customize the "New" menu here in a safe way, but I know you can add a new button to this toolbar with SPFx Extensions.