How to arrange the ribbon item groups?
Asked Answered
P

2

6

I would like to reorder the itemgroups under the home tab as well as reoder the tabs also. say for example: under the home tab few groups are available like (clipboard, Manage, Edit, Publish and etc..). Each group has its own buttons.

I have created few gui extensions buttons and i have assembled them under one group. by default gui extension is placed last under the given tab in the config file.

I would like to place my extension group next to manage or edit group as well as i would like to re order the group.

Could anyone help me on this?

Pelargonium answered 29/1, 2013 at 4:49 Comment(1)
Thanks for your question, could we interest you in committing to the Area 51 Tridion specific proposal. Sign up with the same SO account if you have a moment.Bourassa
B
6

The items under the home group have been ordered by the product, apart from any extensions which have been added. Reordering them is not something which by default belongs to the available options.

However, adding your own group in a specified order rather then at the end is possible. For this you can use the insertbefore attribute in your ext:extension element, roughly like so:

<ext:ribbontoolbars>
  <ext:add>
    <ext:extension assignid="MyGroupID" name="My Name" pageid="HomePage" insertbefore="PublishGroup">
       ...
    </ext:extension>
  </ext:add>
</ext:extension>

See also my article on Tridion Developer which explains how to add a Ribbon Item Group.

What can help you for all the available attributes is to refer to the schema of the extension configuration. There are a couple of them and you can find them on your CM server in the ..\Tridion\web\WebUI\Core\Schemas directory.

To find the IDs which you can use in the insertbefore attribute, you basically need to inspect the HTML of the UI. You will see that every div which makes up a group will have an ID, and its those ID names you can use. Which in turn allows you to basically place your extension group, before any existing item.

Bourassa answered 29/1, 2013 at 9:39 Comment(1)
Thanks Bart ! So i understand from your answer that we can not reorder the pre defined product groups. I have used the "insertbefore" attribute it was working fine to order the button with in the particular group. At the same time, i have tried "insertbefore" attribute to order between my extension groups. it doesnt works for me. I have used the groupid for this purpose in "insertbefore" attribute.Pelargonium
S
5

Bart is right, re-ordering is not possible by default. As an option, you can hide existing groups, create your new custom groups (which will be actually the same, as original from CME) and insert them in the place, you want. And yes, "insertbefore" attribute also works for groups! But be aware, that extensions are applied in the order you specified them in configuration file. For example, if you have two Ribbon Groups extensions in the following order:

<ext:ribbontoolbars>
  <ext:add>
    <ext:extension assignid="MyGroupID1" name="My Name" pageid="HomePage" insertbefore="MyGroupID2">
       ...
    </ext:extension>
    <ext:extension assignid="MyGroupID2" name="My Name" pageid="HomePage" insertbefore="PublishGroup">
       ...
    </ext:extension>
  </ext:add>
</ext:extension>

Group with id "MyGroupID1" will be added at the end of "HomePage", because Group "MyGroupID2" is not there yet! Just by swapping these two extensions you will do the trick.

Stannwood answered 29/1, 2013 at 15:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.