App
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:
Selected: 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:
- Prevent refresh on dialog close - to retrieve the data in JS
- 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.
Instead, you'll see console messages that a custom JS took over the process.
Instead, you'll see console messages that a custom JS took over the process.
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.
Instead, you'll see console messages that a custom JS took over the process.
👉 Run open command