0

I am following below article and was able to add custom action to a library. But unable to do so for List as I do not know the location. I want to get the same location of Location="Ribbon.Documents.Copies.Controls._children"> for a list. Is there a guide with locations applicable to modern list view?

https://msdn.microsoft.com/en-us/pnp_articles/modern-experience-customizations-customize-lists-and-libraries

<pnp:CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Documents.Copies.Controls._children">
          <Button
            Id="Ribbon.Documents.Copies.OfficeDevPnPDownloadAll"
            Command="OfficeDevPnP.Cmd.DownloadAll"
            Image16by16="/_layouts/15/images/sharepointfoundation16.png"
            LabelText="Download All"
            Description="Download all files separately"
            ToolTipTitle="Download All"
            ToolTipDescription="Download all files separately"
            TemplateAlias="o1"
            Sequence="15"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="OfficeDevPnP.Cmd.DownloadAll"
          CommandAction="https://contoso.azurewebsites.net/pages/index.aspx" />
      </CommandUIHandlers>
    </pnp:CommandUIExtension>
2
  • change the Location and <Button Id to <button id="Location="Ribbon.ListItem.Actions.Controls._children"" and check Commented May 26, 2017 at 8:20
  • @GautamSheth Does not work in modern experience.
    – Damitha
    Commented May 26, 2017 at 10:36

1 Answer 1

0

try this Ribbon.ListItem.Actions.Controls._children for Location

MSDN References :

Default Server Ribbon Customization Locations

CustomAction Element

4
  • This does not work in modern experience. This only works in classic mode and appears as a list item action, not a list action.
    – Damitha
    Commented May 26, 2017 at 10:33
  • try this CommandUI.Ribbon.ListView
    – TARUN
    Commented May 26, 2017 at 10:40
  • I assume that is for CustomAction location and not CommandUIDefinition location. Yeah it is working on classic mode. But not in modern experience.
    – Damitha
    Commented May 26, 2017 at 10:45
  • It works. There was an error in my CommandUIDefinition .
    – Damitha
    Commented May 29, 2017 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.