0

I'm interested in adding an element to the top navigation bar, but I've been unable to find information on how to do this. I've found plenty of resources on how to add a navbar link, but what I'm interested in, is adding an extra sub-element (is this even the right word?) to this. I've attached an image to try and exemplify what I mean.

I have some items in the navigation bar. When I click one of these items, a number of sub-items show up, for example 'new document', 'change password' and so on. I want to add a 'change email', but I can't find the place to add this functionality. I've tried looking in the site settings and in SharePoint Designer as well, but with no luck!

Any hints greatly appreciated.

enter image description here

UPDATE 1:

I've tried to add an XML with a custom ribbon which I was hoping would be visible across all lists, but I can't find see it and I'm sure it's probably because I haven't implemented it correctly but I have trouble finding out what and where the problem lies:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
Id="Ribbon.Library.Actions.AddAButton"
Location="CommandUI.Ribbon"
RegistrationId="0x01"
RegistrationType="ContentType"
Title="Change Email Ribbon Button">
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition
      Location="Ribbon.Documents.Share.Controls._children">
      <Button Id="Ribbon.ListForm.Edit.Commit.NewRibbonButton"
      Command="ChangeEmailRibbonButtonCommand"
      Image16by16="/_layouts/15/$Resources:core,Language;/images/formatmap16x16.png?rev=23" Image16by16Top="-127" Image16by16Left="-91"
      Image32by32="/_layouts/15/$Resources:core,Language;/images/formatmap32x32.png?rev=23" Image32by32Top="-477" Image32by32Left="-307"
      LabelText="$Resources:Toolkit,ChangeEmailButtonLabel"
      TemplateAlias="o2" />
    </CommandUIDefinition>
  </CommandUIDefinitions>
  <CommandUIHandlers>
    <CommandUIHandler
      Command="ChangeEmailRibbonButtonCommand"
      CommandAction="javascript:
        ChangeEmail();
      " />
  </CommandUIHandlers>
</CommandUIExtension>
  </CustomAction>
  <CustomAction Id="Ribbon.ListForm.Edit.Commit.Scripts" Location="ScriptLink" ScriptSrc="/_layouts/15/GOToolkit/JS/loadJsOrCssFile.js?version=1.7.3" />
</Elements>
2

1 Answer 1

1

The mentioned place is not a top navigation bar it's a Ribbon, adding any button functionality at this ribbon is called a custom action.

You can add a custom action to ribbon based on your requirements via

4
  • Dear @Khaine775 Are you need to apply the custom action for all lists ? or you have issue at this custom action Commented Aug 2, 2016 at 12:54
  • Yes, I think that would be the best solution.
    – Khaine775
    Commented Aug 2, 2016 at 12:55
  • 1
    so try to change the above code to RegistrationId="171" RegistrationType="List" that should enable the custom action to all task list , please try it and give me update , don't worry I will also stay with you till to try to solve it :) Commented Aug 2, 2016 at 13:04
  • Thanks, I appreciate your help! I still can't see it unfortunately. Am I right in assuming that it only shows when editing an item in a list? If so, that is also the purpose, but even when I do that, I can't see the ribbon button. Am I missing some fundamental element in my implementation? What I've done on the practical side to add the element is in my project: Add Item -> Empty Element -> fill out the Elements.xml.
    – Khaine775
    Commented Aug 2, 2016 at 13:13

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.