Skip to content

Navigating layouts

Create an element with an onClick

Pass parameters using options.parameters, these can be objects.

{
    "component": "--any--",
    "onClick": {
        "target": "layout",
        "options": {
            "id": "view-{data.variant}{data.postfix}",
            "parameters": {
                "document": "{data.task.document}"
            },
            "title": "{data.title}",
            "horizontalPadding": "0",
            "hideAppBar": "{data.hideAppBar|default:false}",
            "confirm": true
        }
    }  
}    

In the target layout

Access parameters via data._. In this example the parameters are then passed to a script.

{
  "component": "flow",
  "id": "flow",
  "kind": "script",
  "options": {
    "navigation": "none",
    "scale": 0.96,
    "viewPort": 0.85,
    "parameters": {
      "handle": "view-workout",
      "day": "{data.document}"
    }
  },
  "script": "cardio",
  "child": {

  }
}