Visibility in ribbon (legacy syntax)

Modified on Mon, 5 Oct at 1:54 PM

BaseExtensions can be used to show or hide elements in the ribbon (even though they are connected to other Alloy Plugins). Using this, we can filter events or hide buttons in ribbon if, for instance, a shape or a document property is not present. To filter events and show/hide buttons, the newest BaseExtensions and Alloy plugins are required.

Supported elements:

  • Bookmark (Word): booksmarks
  • Document properties (All): documentprop
  • Shapes (Word and PowerPoint): shapes
  • Styles (Word): styles
  • Content controls (Word/PowerPoint): contentcontrol

Legacy syntax

The legacy syntax for showing or hiding elements in ribbon:

XML
<Button label="xx" visible="insertElementHere-xx">

Here is an example:

This button cleverly detects if the document originated from Templafy by using the TemplafyTimeStamp property:

XML
<Button label="Blah" visible="BaseExtensions:documentprop-TemplafyTimeStamp">

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article