• Basics
  • Abyss
  • Web APIs
  • C# & Razor
  • .net API
  • JS & TS API

    Show / Hide Table of Contents

    Class SxcCms

    This is in charge of sxc.cms on the instance level. ATM it just has the run command. In future, it may also have dedicated command like layout etc.

    cms Service of the Sxc Instance

    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

    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


    Demo App and further links

    • 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

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

    real type is actually RunParams

    Returns
    Type Description
    Promise<void | T>
    • Improve this Doc
    Back to top Generated by DocFX