Solved

Button not visible in Custom Group

Posted on 2014-03-28
1
487 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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

I have just recently built a new SharePoint 2007 farm on a complete Windows 2008 R2 server platform and part of my standard build procedure is to implement a warm up routine, usually in the form of a script that is scheduled every morning to launch …
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now