Solved

Button not visible in Custom Group

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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 …
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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