Solved

Button not visible in Custom Group

Posted on 2014-03-28
1
494 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
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…

791 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