Solved

Button not visible in Custom Group

Posted on 2014-03-28
1
511 Views
Last Modified: 2014-03-29
I have created a custom group, and added an icon button for the user to click on. For some reason, but button is not visible.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="Ribbon.Documents.CustomGroupInExsitingTab" 
                  RegistrationType="List" 
                  RegistrationId="101" 
                  Location="CommandUI.Ribbon" >
      <CommandUIExtension>
        <CommandUIDefinitions>
          <CommandUIDefinition Location="Ribbon.Documents.Scaling._children">
            <MaxSize Id="Ribbon.Documents.CustomGroup.MaxSize" 
                     GroupId="Ribbon.Documents.CustomGroup" 
                     Size="LargeLargev" 
                     Sequence="10" />
          </CommandUIDefinition>
          <CommandUIDefinition Location="Ribbon.Documents.Scaling._children">
            <Scale Id="Ribbon.Documents.CustomGroup.LargeSmall" 
                   Sequence="230" 
                   GroupId="Ribbon.Documents.CustomGroup" 
                   Size="LargeSmall" />
          </CommandUIDefinition>
          <CommandUIDefinition Location="Ribbon.Documents.Groups._children">
            <Group Id="Ribbon.Documents.CustomGroup"
                   Sequence="10"
                   Title="Custom Group"
                   Template="Ribbon.Templates.Flexible2"
                   Image32by32Popup="/_layouts/$Resources:core,Language;/images/formatmap32x32.png">
              <Controls Id="Ribbon.Documents.CustomGroup.Controls">
                <Button Id="Ribbon.Documents.CustomGroup.Notify"
                      Command="CustomGroup.Command.Notify"
                      Sequence="15"
             Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png"
             Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png"

                      Description="Notification hello message"
                      LabelText="Notify"
                      TemplateAlias="o1" />
              </Controls>
            </Group>
          </CommandUIDefinition>
        </CommandUIDefinitions>
      <CommandUIHandlers>
          <CommandUIHandler Command="CustomGroup.Command.Notify" 
                            CommandAction="javascript: SP.UI.Notify.addNotification('Hello from my custom group);  " />
      </CommandUIHandlers>
      </CommandUIExtension>
    </CustomAction>
</Elements>

Open in new window

0
Comment
Question by:brendanlefavre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
brendanlefavre earned 0 total points
ID: 39964454
This is the solution

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
      Id="EmailDocsCustom"
      Location="CommandUI.Ribbon"
      RegistrationType="ContentType"
      RegistrationId="0x01">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Documents.Groups._children">
          <Group
              Id="EmailDocsCustomGroup"
              Sequence="10"
              Description="Permanent Link"
              Title="Permanent Link"
              Template="EmailDocsCustomGroupTemplate">
            <Controls Id="EmailDocsCustomGroupControl">
              <Button
                  Id="EmailDocsCustomGroupControlButton"
                  Sequence="5"
                  Command="SimpleAlert"
                  Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Left="-448" Image32by32Top="-128"
                  Description="Copies a permanent link to the clipboard"
                  LabelText="Copy Link to Clipboard"
                  ToolTipTitle="Copy Link to Clipboard"
                  TemplateAlias="o1" />
            </Controls>
          </Group>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="EmailDocsCustomGroupTemplate">
            <Layout Title="LargeLarge">
              <OverflowSection Type="OneRow" TemplateAlias="o1" DisplayMode="Large"/>
              <OverflowSection Type="OneRow" TemplateAlias="o2" DisplayMode="Large"/>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.Documents.Scaling._children">
          <MaxSize Id="Ribbon.Documents.Scaling.Custom.MaxSize" Sequence="15" GroupId="EmailDocsCustomGroup" Size="LargeLarge" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler 
          Command="SimpleAlert"
          CommandAction="javascript:EmailUniqueLink();"
          EnabledScript="javascript:EnableEmailUniqueLink();"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>

  <CustomAction
     Id="EmailRelatedScript"
     Location="ScriptLink"
     ScriptSrc ="/_layouts/15/SP.Branding/EmailUniqueLinkButton.js"/>
</Elements>

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question