Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I would like to make a ribbontoolbar button like the NewComponent Button in the Create tab. So one which has the ability to add options with a drop down menu.

printscreen of the New Component Button in CME

I have Looked into the CME editor of Tridion but do not seem to find how to make this myself.

I already have some code to make that ribbon tab and button but cannot find how to add the dropdown functionality with more options.

<ext:ribbontoolbars>
      <ext:add>
        <ext:extension pageid="MyPage" groupid="DefaultGroup" name="Action" assignid="Btn-MyPage-Action">
          <ext:command>Action</ext:command>
          <ext:title>Do Action</ext:title>
          <ext:dependencies>
            <cfg:dependency>Tryout.RibbonTab.Commands</cfg:dependency>
          </ext:dependencies>
          <ext:apply>
            <ext:view name="DashboardView">
              <ext:control id="DashboardToolbar" />
            </ext:view>
          </ext:apply>
        </ext:extension>
      </ext:add>
</ext:ribbontoolbars>
share|improve this question

2 Answers 2

up vote 3 down vote accepted

Article from Bart actually describes everything you might need in this perspective.

I'd only add that you can`t extend a Button via external control. However, you can add a group with the buttons you need. Like

<ext:extension insertbefore="" 
       name="ExtendedGroup" 
       assignid="ExtendedGroup"
       pageid="HomePage">
        <ext:group>~/Extension/ExtensionItemsGroup.ascx</ext:group>
        <ext:apply>
                <ext:view name="DashboardView">
                    <ext:control id="DashboardToolbar" />
            </ext:view>
        </ext:apply>
</ext:extension>

While in ExtensionItemsGroup.ascx it should be Dropdown button

<c:RibbonButton runat="server" CommandName="ExtendedButton1" IsDropdownButton="true" Title="TestButton" ID="UsersDropdown">
    <c:RibbonContextMenuItem runat="server" Command="ExtendedButton1" Title="ExtendedButton1" Label="ExtendedButton1" ID="ExtendedButton1" />
    <c:RibbonContextMenuItem runat="server" Command="ExtendedButton2" Title="ExtendedButton2" Label="ExtendedButton2" ID="ExtendedButton2" />
</c:RibbonButton>

Or split button:

<c:RibbonSplitButton runat="server" CommandName="Split1" Title="SplitButton" Label="SplitButton>" ID="SplitButton">
    <c:RibbonContextMenuItem runat="server" ID="SplitButton" Command="Split1"  Title="Split1" Label="Split1" />
    <c:RibbonContextMenuItem runat="server" ID="Split2Button" Command="Split2"  Title="Split2" Label="Split2" />
</c:RibbonSplitButton>
share|improve this answer
    
Thank you! This was what I needed. –  Thomas Hendrickx Jul 25 at 8:56

I'm not sure how to actually create such a drop down, but fairly sure it is using a Tridion User Conrtol (.ascx) like is the story with the Ribbon Item Group (where you can have three small buttons stacked under eachother).

See my blog post about how to use the Ribbon Item Group: http://www.tridiondeveloper.com/ribbon-item-group and take it from there. You will probabaly need to further inspect the existing files in the SDL Tridion CME client and there you should be able to find how it is done, and then you just have to replicate it (like I did with the Ribbon Item Group).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.