Table of Contents

Class SxcCms

test

cms Service of the Sxc Instance XXX

you are here (click to zoom) - discover the stack

Very often your JS will want to execute CMS related commands, like opening the edit dialog.

The cms object on the Sxc-Instance is responsible for this. It's very similar to the global $2sxc.cms object, except that it already knows what context it's running in.

Note

This was introduced in 2sxc v13.03. It should replace most of the global $2sxc.cms commands, but for now both are available.

As of now, the cms object only has one command called run(...).

run Command

The run command only has one signature:

 run<T>(runParams: RunParams): Promise<void | T>

This is similar to the global run but it already knows the context it's running in.


Tutorial

TODO

  • TODO

History

  1. Created in v13.03

Package: Api.Js.SxcJs

Methods

run(RunParams)

Run a command on this sxc-instance. Requires edit mode to be on, which would enable the edit-JS parts. To use, remember to activate 2sxc.JsCms on the page

cms Service of the Sxc Instance XXX

you are here (click to zoom) - discover the stack

Very often your JS will want to execute CMS related commands, like opening the edit dialog.

The cms object on the Sxc-Instance is responsible for this. It's very similar to the global $2sxc.cms object, except that it already knows what context it's running in.

Note

This was introduced in 2sxc v13.03. It should replace most of the global $2sxc.cms commands, but for now both are available.

As of now, the cms object only has one command called run(...).

run Command

The run command only has one signature:

 run<T>(runParams: RunParams): Promise<void | T>

This is similar to the global run but it already knows the context it's running in.


Tutorial

TODO

  • TODO

History

  1. Created in v13.03

Declaration
function run<T>(runParams: RunParams)
Parameters
Type Name Description
RunParams runParams

real type is actually RunParams

Returns
Type Description
Promise<void | T>