App


Toolbars Tutorials

Tutorial HomeToolbars

Advanced Toolbar Customizations

Important: Usually only editors see these toolbars - so saving won't work. Hover over the various boxes to see the result - like this:

The samples can differ based on your Razor base class or if you're running an old version.
Switch to Typed (2sxc 16+) Switch to Dynamic (Razor14 or below)

2sxc UI - Toolbar Workflows

Toolbars will automatically do things like open a dialog or refresh the page when the dialog closes. But sometimes you want to override or change the default behavior - like:

  1. Prevent refresh on dialog close - to retrieve the data in JS
  2. Prevent creating new if a specific condition applies

This is what the Workflows are for. You can register custom before and after code to run, change specs or prevent the action from executing. Read the workflow docs or the toolbar docs to learn more about this.

Use cms.run() to call Toolbar Commands from JS-Events

In some cases you need to call a CMS command without using the toolbar - like in SPAs and in situations where a normal HTML button should call edit. You can also use this to trigger Workflows (new in 12.10).

You can register custom before and after code to run, change specs or prevent the action from executing. Read the workflow docs or the toolbar docs to learn more about this.