Solved

Button not visible in Custom Group

Posted on 2014-03-28
1
490 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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 …
The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

930 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

11 Experts available now in Live!

Get 1:1 Help Now