With Scrivito.extendMenu
, custom menu items may depend on an external service, which requires asynchronous communication.
Scrivito automatically updates the top-right menu on every content-related change, however, other asynchronous changes are not automatically reflected. In such advanced cases, Scrivito.updateMenuExtensions
comes to the rescue.
Whenever a state change in your application affects a menu extension, call Scrivito.updateMenuExtensions
. This forces the menu extensions to be re-evaluated. Afterwards, the menu will be in sync with the application’s current state.
Examples