none
Enabling a flyout anchor in sharepoint 2013 ribbon without using javascript

    Question

  • Hi,

    So I'm using Visual Studio 2013 and my sharepoint developer site to design a flyout anchor with a drop down menu. In the future I hope to be able to create a flyout anchor in WikiPage that will execute some javascript and perfom actions on the current site page. But for the time being I'm just trying to figure out what my custom action will look like. This is what I have: 

    <CustomAction Id="800a07bc-2e4d-4fca-9136-03d3b7d1745d.RibbonCustomAction3"
                    RegistrationType="List"
                    RegistrationId="101"
                    Location="CommandUI.Ribbon" 
                    Sequence="10001"
                    Title="Invoke &apos;RibbonCustomAction3&apos; action">
        <CommandUIExtension>
          <!-- 
          Update the UI definitions below with the controls and the command actions
          that you want to enable for the custom action.
          -->
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.Library.Settings.Controls._children">
              <FlyoutAnchor Id="Ribbon.StaticInsert.DropDown"
                            Alt="Static dropdown"
                            Sequence="100"
                            Command="SayHello"
                            CommandType="General"
                            Image32by32="_layouts/15/images/placeholder32x32.png"
                            PopulateDynamically="false"
                            LabelText="Static FlyoutAnchor"
                            ToolTipTitle="Static DropDown"
                            ToolTipDescription="Show dropdown test 1" 
                            TemplateAlias="o1">
                <Menu Id="Ribbon.StaticInsert.DropDown.Menu">
                  <MenuSection Id="Ribbon.StaticInsert.DropDown.Section" Sequence="10" DisplayMode="Menu16">
                    <Controls Id="Ribbon.StaticInsert.DropDown.Section.Controls">
                      <Button Id="Ribbon.Library.Settings.RibbonCustomAction3Button"
                      Alt="Request RibbonCustomAction3"
                      Sequence="100"
                      Command="Invoke_RibbonCustomAction3ButtonRequest"
                      LabelText="Request RibbonCustomAction3"
                      TemplateAlias="o1"
                      Image32by32="_layouts/15/images/placeholder32x32.png" 
                      Image16by16="_layouts/15/images/placeholder16x16.png" />
                    </Controls>
                  </MenuSection>
                </Menu>
              </FlyoutAnchor>
              
            </CommandUIDefinition>
          </CommandUIDefinitions>
          <CommandUIHandlers>
            <CommandUIHandler Command="Invoke_RibbonCustomAction3ButtonRequest" 
                              CommandAction="~appWebUrl/Pages/Default.aspx?{StandardTokens}&amp;SPListItemId={SelectedItemId}&amp;SPListId={SelectedListId}"/>
          </CommandUIHandlers>
        </CommandUIExtension >
      </CustomAction>

    Unfortunately it appears disabled in my ribbon. Obviously I would like it to be enabled so that for I can figure what I have just designed. But I would like my anchor to  be enabled independently of anything else/ regardless of whether there is a list or selected elements. 

    Any help or advice?

    Thanks a lot. 


    Wednesday, September 03, 2014 1:00 PM