I have a custom GUI extension working that lets me override the Save command (see Rob's article http://www.curlette.com/?p=913).

Ideally I want to hide the button altogether when in the Component UI view - for which there does appear to be a doHide() method on the Tridion.Controls.RibbonButton itself which works well when I tested in Chrome Dev Tools.

What I can't figure is how to get to the Save button in order to call doHide()?

The following gives me all the controls on the ribbon bar


Of which an object called UID_63 is the Save button:

enter image description here

So this works:


But there must be a nicer way than knowing that UID number?

There is a hasControl() method but I can only ever get false out of it:


And the getControl() method seems to be for adding new controls, not getting current ones?

$display.getWindow().$controls.getControl(n, f, i);


  • You could iterate all the controls like this: var controls = $display.getView().getWindow().$controls.getAllControls("Tridion.Controls.RibbonButton"). And then: for (var key in controls) { var id = controls[key].getId(); if (id == "SaveBtn") { controls[key].doHide(); } } I'm sure there's a more elegant way to solve this, but this might be a good start Commented Mar 30, 2018 at 17:28
  • And yes, there is indeed: $display.getView().getWindow().$controls.getControl($("#SaveBtn"), "Tridion.Controls.RibbonButton").doHide() :) Commented Mar 30, 2018 at 17:39
  • Thanks Albert - it appeared to be the passing of the param as $("#SaveBtn") was something I missed. Make that at answer and I'll accept it.
    – Neil
    Commented Apr 5, 2018 at 8:22

1 Answer 1


You can get a hold of the Save Button like this:

$display.getView().getWindow().$controls.getControl($("#SaveBtn"), "Tridion.Controls.RibbonButton").doHide()


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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