Skip to content

LayoutPage

LayoutPage manifests describe full pages of a report. They control headers, date and measure metadata, page size/orientation, and child components.

LayoutPage with 2x2 grid showing ChartStructure, ChartTime, Table, and Text components

The schema requires nothing but the document envelope, so the smallest useful LayoutPage is driven by what the page actually renders: a title row that says who, what and when, a layout with as many slots as children, and the children themselves.

apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: kpi_dashboard
spec:
  titleBusinessUnit: "Group Controlling"
  titleMeasures:
    - name: "Revenue"
      unit: "mEUR"
  titleScenarios: ["ac1", "pp1"]
  titleDateStart: "2024-01-01"
  titleDateEnd: "2024-12-31"
  titleDateFormat: month
  titleDateLink: interval
  pageLayout: split-vertical
  footerText: "bino - internal preview"
  children:
    - kind: ChartStructure
      spec:
        dataset: revenue_by_region
        chartTitle: "Revenue by region"
        scenarios: ["ac1", "pp1"]
        variances: ["dac1_pp1_pos"]
    - kind: Table
      spec:
        dataset: revenue_by_customer

All attributes are listed in the Attribute Reference below.

Children can also be pulled in by name instead of being inlined, see Referencing standalone components, and the page can be reused with different values, see LayoutPage Parameters.

Key fields (see JSON schema for full list):

  • Title row fields: titleBusinessUnit, i18nNamespace (titleNamespace is deprecated), titleDateStart, titleDateEnd, titleDateFormat, titleDateLink, titleMeasures, titleScenarios, titleVariances, titleOrder, titleOrderDirection. The date fields accept both date (2024-01-01) and datetime (2024-01-01T14:30:00Z) values.
  • Page frame fields: pageLayout, pageCustomTemplate, pageGridGap, pageFormat, pageOrientation, pageFitToContent, pageNumber, footerDisplayPageNumber, footerText.
  • Message row: messageImage, messageText.
  • Styling: selectedStyle - optional name of a ComponentStyle to apply to the page frame; merged over the _system and _default styles. Requires a template engine release that forwards selected-style to the inner page element. Inline children accept selectedStyle in their spec as well.
  • IBCS rules: ruleset - optional name of a RuleSet applied to the page title; child components inherit it via ruleset: inherited-page or ruleset: inherited-closest.
  • Content: children - array of layoutChild objects. May be empty or omitted while scaffolding; the page-layout-slots-used lint rule warns when a page referenced by an artefact does not fill its layout slots.

Formatting the message and the business unit

Section titled “Formatting the message and the business unit”

messageText and titleBusinessUnit accept inline Markdown and inline HTML. The value is converted to HTML at build time and sanitized by the template engine before it is rendered - only safe tags (<b>, <i>, <strong>, <em>, <br>, <a>, …) survive; event handlers and javascript: URLs are stripped.

Use <br /> for an explicit line break. A plain newline in the YAML does not break the line - it is a soft break and collapses to a space, exactly like in a Text component:

spec:
  titleBusinessUnit: "Acme **Corp**<br />Group Controlling"
  messageText: >-
    Revenue **above plan** in all regions.<br />
    Eastern Europe grew by *20.8%* versus prior year.

Only inline Markdown is interpreted - bold, italic, code spans, links, strikethrough. Block Markdown is deliberately not interpreted, so ordinary values keep their literal meaning: 1. Quartal 2024 stays a plain string instead of turning into a numbered list, and # 1 Vertrieb does not become a heading. For block content (headings, lists, tables) use a Text component.

Images from Asset manifests can be embedded with the asset: URL scheme (![Logo](asset:brandLogo)), though the message row has a dedicated messageImage field for its logo.

The other title fields (titleMeasures, titleScenarios, …) and footerText are plain text.

pageLayout controls how components are arranged. The enum includes:

  • full
  • split-horizontal, split-vertical
  • 2x2, 3x3, 4x4
  • 1-over-2, 1-over-3, 2-over-1, 3-over-1
  • custom-template

For custom-template, set pageCustomTemplate to a CSS grid-template-areas string, for example:

pageLayout: custom-template
pageCustomTemplate: |
  "a a" \
  "b c"
---
apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: kpi_dashboard
spec:
  titleBusinessUnit: "Group Controlling"
  titleDateStart: 2024-01-01
  titleDateEnd: 2024-12-31
  titleDateFormat: year
  titleDateLink: none
  titleMeasures:
    - name: "Revenue"
      unit: "mEUR"
  titleScenarios: ["ac1", "fc1", "pp1"]
  pageLayout: 2x2
  pageFormat: a4
  pageOrientation: landscape
  footerDisplayPageNumber: true
  footerText: "bino - internal preview"
  children:
    - kind: ChartStructure
      spec:
        dataset: revenue_by_region
        chartTitle: "Revenue by region"
        level: category
        scenarios: ["ac1", "py1"]
        variances: ["dpy1_ac1_pos"]
    - kind: Table
      spec:
        dataset: revenue_by_customer
        type: list
        limit: 10

Later you can add more components or convert parts of the page into LayoutCard children.

Instead of inlining the full spec for each child, you can reference standalone document manifests by name using the ref field. This enables component reuse across multiple pages and cleaner separation of concerns.

# Define a reusable chart as a standalone document
---
apiVersion: bino.bi/v1alpha1
kind: ChartTime
metadata:
  name: salesTrendChart
spec:
  dataset: monthly_sales
  chartTitle: "Monthly Sales Trend"
  dateInterval: month

---
# Reference it in a LayoutPage
apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: dashboard
spec:
  pageLayout: 2x2
  children:
    - kind: ChartTime
      ref: salesTrendChart

You can override specific fields from the referenced document by providing a partial spec. The override is deep-merged with the base spec (objects merge recursively, arrays replace entirely).

children:
  - kind: ChartTime
    ref: salesTrendChart
    spec:
      chartTitle: "Q4 Sales Trend" # Override just the title
      dateInterval: quarter # Override the interval

Referenced documents can declare parameters in metadata.params (same structure as LayoutPage parameters) and use ${NAME} placeholders in their spec. Pass values with the params field - explicit values beat declared defaults, which beat an environment variable of the same name. select params expose ${NAME_LABEL}.

children:
  - kind: Text
    ref: regional-commentary
    params:
      REGION: US # Values must be quoted strings

params is only valid together with ref. Inline spec overrides are merged after the params are expanded. Grid children and tree nodes accept params the same way.

You can reference documents of these kinds:

  • Text
  • Table
  • ChartStructure
  • ChartTime
  • ChartScatter
  • ChartBubble
  • ChartBullet
  • Tree
  • Grid
  • LayoutCard
  • Image

Note: LayoutPage cannot be referenced. Each page must be a root document.

By default, if a referenced document doesn’t exist, the build fails with an error. This fail-fast behavior helps catch typos, missing files, and broken references early.

Error: required reference "revenue_chart" of kind "ChartTime" not found

Constraint-filtered refs are handled differently: if a referenced document exists but was filtered out by constraints for the current artefact, the child is silently skipped. This allows constraint-based filtering to work naturally with referenced components.

For references that may legitimately be missing (e.g., debug-only components, environment-specific features), use the optional field:

children:
  - kind: ChartTime
    ref: salesTrendChart # Required: fails if missing
  - kind: Text
    ref: debugPanel
    optional: true # Optional: skips gracefully if missing

When optional: true and the ref is missing, the child is skipped with an info log instead of failing the build.

When to use optional: true:

  • Preview/debug-only components (filtered by mode constraints)
  • Environment-specific features (filtered by env labels)
  • Format-specific components (may not exist for all output formats)

Do not use optional: true to work around typos or missing files. Always fix the actual issue instead.

Inline children can have metadata.constraints to conditionally include them based on the target artefact’s context. This allows different components to appear for different artefacts, modes, or environments.

Constraints support two formats: string (concise) and structured (IDE-friendly).

apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: dashboard
spec:
  pageLayout: 2x2
  children:
    # String format - quick and readable
    - kind: Table
      metadata:
        name: prodTable
        constraints:
          - mode==build
          - labels.env==prod
      spec:
        dataset: production_data

    # Structured format - better IDE support
    - kind: Text
      metadata:
        name: debugInfo
        constraints:
          - field: mode
            operator: "=="
            value: preview
      spec:
        value: "Debug information - only visible in preview"

    # No constraints - always included
    - kind: ChartStructure
      spec:
        dataset: summary_data
Operator Description String Example Structured Example
== Equals labels.env==prod {field: "labels.env", operator: "==", value: "prod"}
!= Not equals mode!=preview {field: "mode", operator: "!=", value: "preview"}
in Value in array labels.env in [dev,qa] {field: "labels.env", operator: "in", value: ["dev", "qa"]}
not-in Value not in array mode not-in [serve] {field: "mode", operator: "not-in", value: ["serve"]}
Field Path Description Example Values
mode Current execution mode build, preview, serve
labels.<key> Artefact’s metadata.labels.<key> Any string value
spec.<field> Artefact’s spec.<field> Format, orientation, etc.
spec:
  pageLayout: split-vertical
  children:
    # Only in build mode
    - kind: Table
      metadata:
        constraints:
          - mode==build
      spec:
        dataset: final_data

    # Only in preview mode
    - kind: Text
      metadata:
        constraints:
          - mode==preview
      spec:
        value: "Preview placeholder - data will appear in build"

For comprehensive constraint documentation, see Constraints and Scoped Names.

LayoutPages can define typed parameters that allow the same page to be reused with different values. This is useful for creating templates that can be instantiated multiple times with different data, such as regional reports, time-period comparisons, or any scenario where you want to render the same layout with different configurations.

Parameters are defined in metadata.params. Each parameter has a name, type, and optional validation rules.

apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: regional-sales
  params:
    - name: REGION
      type: select
      description: "Region to display"
      required: true
      options:
        items:
          - value: "EU"
            label: "Europe"
          - value: "US"
            label: "North America"
          - value: "APAC"
            label: "Asia Pacific"
    - name: YEAR
      type: number
      description: "Reporting year"
      default: "2024"
      options:
        min: 2020
        max: 2030
    - name: SHOW_DETAILS
      type: boolean
      description: "Show detailed breakdown"
      default: "false"
spec:
  titleBusinessUnit: "Sales Report - ${REGION}"
  pageLayout: split-vertical
  children:
    - kind: Text
      metadata:
        name: region-header
      spec:
        value: "Region: ${REGION} | Year: ${YEAR}"
        style:
          fontSize: 24
          fontWeight: bold
    - kind: Table
      metadata:
        name: regional-table
      spec:
        dataset: sales-data
Type Description Options
string Free-form text value None
number Numeric value min, max
boolean True/false value None
select Choice from predefined options items array with value and label
date Date value (YYYY-MM-DD) None
date_time Date and time value (YYYY-MM-DDTHH:MM, seconds optional, or RFC 3339) None
Field Required Description
name Yes Parameter name (used as ${NAME} in the spec)
type No Parameter type, defaults to string
description No Human-readable description
default No Default value if not provided
required No If true, the parameter must be provided
options No Type-specific options (see below)

For select type:

options:
  items:
    - value: "EU"
      label: "Europe"
    - value: "US"
      label: "North America"

For number type:

options:
  min: 2020
  max: 2030

Parameters are referenced using ${PARAM_NAME} syntax anywhere in the LayoutPage spec. They work just like environment variables but are resolved when the page is instantiated.

spec:
  titleBusinessUnit: "Report for ${REGION}"
  children:
    - kind: Text
      spec:
        value: "Year: ${YEAR}, Region: ${REGION}"
    - kind: Table
      spec:
        dataset: sales-by-region
        type: sum
        # Parameters can be used in any string field
        sumTitle: "${REGION} Sales Data"

Parameters can have default values that are used when no value is provided:

params:
  - name: YEAR
    type: number
    default: "2024"
  - name: CURRENCY
    type: string
    default: "EUR"

To use a parameterized LayoutPage in a ReportArtefact, use the object form with page and params:

apiVersion: bino.bi/v1alpha1
kind: ReportArtefact
metadata:
  name: multi-region-report
spec:
  format: xga
  orientation: landscape
  layoutPages:
    # String form - no params
    - cover-page

    # Object form - with params
    - page: regional-sales
      params:
        REGION: EU
        YEAR: "2024"

    # Same page with different params
    - page: regional-sales
      params:
        REGION: US
        YEAR: "2024"

    - page: regional-sales
      params:
        REGION: APAC
        YEAR: "2024"
        SHOW_DETAILS: "true"

  filename: multi-region-report.pdf
  title: "Multi-Region Sales Report"

This generates a PDF with four pages:

  1. The cover page (no params)
  2. Regional sales for Europe
  3. Regional sales for North America
  4. Regional sales for Asia Pacific (with detailed breakdown)

You can mix string patterns and parameterized objects in the same layoutPages list:

layoutPages:
  - cover # String: exact match
  - intro-* # String: glob pattern
  - page: regional-sales # Object: with params
    params:
      REGION: EU
  - appendix-* # String: glob pattern

Parameters are validated against their type and options:

params:
  - name: REGION
    type: select
    required: true
    options:
      items:
        - value: "EU"
        - value: "US"
        - value: "APAC"

If you pass an invalid value (e.g., REGION: "INVALID"), a warning is emitted but the build continues.

A number must be a decimal number within min and max, a date must be YYYY-MM-DD, and a date_time must be YYYY-MM-DDTHH:MM (seconds optional) or RFC 3339. A value that contains ${VAR} is not checked.

If a required parameter is missing and has no default, an error is raised.

Parameter values can reference environment variables:

layoutPages:
  - page: regional-sales
    params:
      REGION: ${DEFAULT_REGION} # From environment
      YEAR: ${REPORT_YEAR:2024} # With fallback default

This allows runtime configuration of parameter values.

Create a report comparing multiple time periods:

# Define a reusable period comparison page
---
apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: period-comparison
  params:
    - name: PERIOD_START
      type: date
      required: true
    - name: PERIOD_END
      type: date
      required: true
    - name: PERIOD_LABEL
      type: string
      required: true
spec:
  titleBusinessUnit: "${PERIOD_LABEL}"
  pageLayout: split-vertical
  children:
    - kind: Text
      spec:
        value: "${PERIOD_LABEL}: ${PERIOD_START} to ${PERIOD_END}"
    - kind: Table
      spec:
        dataset: sales-data
        type: sum
        sumTitle: "Sales for ${PERIOD_LABEL}"

---
# Use it multiple times in a report
apiVersion: bino.bi/v1alpha1
kind: ReportArtefact
metadata:
  name: quarterly-comparison
spec:
  format: xga
  layoutPages:
    - page: period-comparison
      params:
        PERIOD_LABEL: "Q1 2024"
        PERIOD_START: "2024-01-01"
        PERIOD_END: "2024-03-31"
    - page: period-comparison
      params:
        PERIOD_LABEL: "Q2 2024"
        PERIOD_START: "2024-04-01"
        PERIOD_END: "2024-06-30"
    - page: period-comparison
      params:
        PERIOD_LABEL: "Q3 2024"
        PERIOD_START: "2024-07-01"
        PERIOD_END: "2024-09-30"
    - page: period-comparison
      params:
        PERIOD_LABEL: "Q4 2024"
        PERIOD_START: "2024-10-01"
        PERIOD_END: "2024-12-31"
  filename: quarterly-comparison.pdf
  title: "2024 Quarterly Comparison"

Create a report with multiple dimensions (region × product):

---
apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: dimension-analysis
  params:
    - name: REGION
      type: select
      options:
        items:
          - value: "EU"
          - value: "US"
    - name: PRODUCT
      type: select
      options:
        items:
          - value: "Widget"
          - value: "Gadget"
spec:
  titleBusinessUnit: "${REGION} - ${PRODUCT}"
  pageLayout: 2x2
  children:
    - kind: ChartStructure
      spec:
        dataset: sales-data
        chartTitle: "${PRODUCT} Sales in ${REGION}"
    - kind: Table
      spec:
        dataset: sales-data

---
apiVersion: bino.bi/v1alpha1
kind: ReportArtefact
metadata:
  name: dimension-report
spec:
  layoutPages:
    # EU pages
    - page: dimension-analysis
      params:
        REGION: EU
        PRODUCT: Widget
    - page: dimension-analysis
      params:
        REGION: EU
        PRODUCT: Gadget
    # US pages
    - page: dimension-analysis
      params:
        REGION: US
        PRODUCT: Widget
    - page: dimension-analysis
      params:
        REGION: US
        PRODUCT: Gadget
  filename: dimension-report.pdf
  title: "Cross-Dimension Analysis"

Parameters work with LiveReportArtefact routes, allowing interactive reports:

apiVersion: bino.bi/v1alpha1
kind: LiveReportArtefact
metadata:
  name: interactive-dashboard
spec:
  title: "Sales Dashboard"
  routes:
    "/regional":
      layoutPages:
        - page: regional-sales
          params:
            REGION: ${REGION} # From query params
            YEAR: ${YEAR}
      queryParams:
        - name: REGION
          type: select
          default: "EU"
          options:
            items:
              - value: "EU"
                label: "Europe"
              - value: "US"
                label: "North America"
        - name: YEAR
          type: number
          default: "2024"
          options:
            min: 2020
            max: 2030

When users visit /regional?REGION=US&YEAR=2023, the page renders with those parameter values.

  1. Use descriptive parameter names: Use clear, uppercase names like REGION, YEAR, PRODUCT_LINE.

  2. Provide defaults: Always provide sensible defaults for non-required parameters.

  3. Document parameters: Use the description field to explain what each parameter controls.

  4. Validate with types: Use appropriate types (number, select, date, date_time) to ensure valid values.

  5. Keep parameter lists short: If you need many parameters, consider breaking the page into smaller, focused components.

  6. Use consistent naming: If the same concept (e.g., region, year) appears in multiple pages, use the same parameter name.

Parameters and constraints serve different purposes:

Feature Parameters Constraints
Purpose Vary content within a page Include/exclude entire pages
Scope Per-instance values Per-artefact filtering
Use case Same layout, different data Different layouts for different contexts
Syntax ${PARAM} in spec metadata.constraints

You can combine both: use constraints to filter which pages are included, and parameters to customize the included pages.

Attribute Type Required Default Description
apiVersion string yes - Must be bino.bi/v1alpha1.
kind string yes - Must be LayoutPage.
metadata.name string yes - Unique identifier.
metadata.labels object no - Key-value pairs for categorization and constraint matching.
metadata.annotations object no - Arbitrary key-value metadata, not used by the system.
metadata.description string no - Free-form description.
metadata.constraints array no - Conditional inclusion rules. See Constraints.
metadata.params array no - Typed parameters for page reuse. See LayoutPage Parameters.
Attribute Type Required Default Description Sample
spec.titleBusinessUnit string no "" Business unit name in the title header. Supports inline Markdown and HTML. titleBusinessUnit: "Sales"
spec.titleNamespace string no - Deprecated: use i18nNamespace. Namespace for title translations only; never applies to children. Setting it raises the titleNamespace Deprecated lint finding. titleNamespace: audited
spec.i18nNamespace string no - I18n namespace for the page title and, via inheritance, all children (their own i18nNamespace wins). Takes precedence over titleNamespace. i18nNamespace: audited
spec.titleDateStart string no - Start date (ISO 8601 date or datetime). titleDateStart: 2024-01-01
spec.titleDateEnd string no - End date (ISO 8601 date or datetime). titleDateEnd: 2024-03-31
spec.titleDateFormat string no none Date display format. Values: year, quarter, month, week, day, time, auto, none. none is a simple datestring with no format titleDateFormat: quarter
spec.titleDateLink string no none Date linking style. Values: avg, interval, cum, start, end, ytd, ytg, mat, none. titleDateLink: interval
spec.titleMeasures array or string no - Measures displayed in the title. Array of {name, unit} objects or JSON string. If all units are the same, redundant units are reduced and the names concatenated. If the unit is empty, the row is omitted. see below
spec.titleMeasures[].name string yes - Measure name. name: "Revenue"
spec.titleMeasures[].unit string yes - Measure unit. unit: "mEUR"
spec.titleScenarios array or string no - Scenarios displayed in the title. Values: ac1-ac4, fc1-fc4, pp1-pp4, pl1-pl4. titleScenarios: ["ac1", "fc1", "pp1"]
spec.titleVariances array or string no - Variance definitions. Pattern: d<scenarioB>_<scenarioA>_[pos|neg|neu]. titleVariances: ["dpp1_ac1_pos"]
spec.titleOrder string no category Sort order for title elements. Values: category, categoryindex, rowgroup, rowgroupindex, ac1-ac4, fc1-fc4, pp1-pp4, pl1-pl4. titleOrder: ac1
spec.titleOrderDirection string no asc Sort direction. Values: asc, desc. titleOrderDirection: asc
Attribute Type Required Default Description Sample
spec.pageLayout string no full Grid layout preset. Values: full, split-horizontal, split-vertical, 2x2, 3x3, 4x4, 1-over-2, 1-over-3, 2-over-1, 3-over-1, custom-template. pageLayout: 2x2
spec.pageCustomTemplate string no "a b" "c d" CSS grid-template-areas string. Used with pageLayout: custom-template. see Page layouts
spec.pageGridGap string no "0" Gap between grid cells in pixels. pageGridGap: "8"
spec.pageFormat string no xga Page size. Values: xga, hd, full-hd, 4k, 4k2k, a4, a3, a2, a1, a0, letter, legal. pageFormat: a4
spec.pageOrientation string no derived from pageFormat Page orientation. Values: landscape, portrait. pageOrientation: landscape
spec.pageFitToContent boolean no false When true, the page body height shrinks to fit content. When false (default), it stretches to fill the full page height. Use false when the page contains auto-scaling components. pageFitToContent: false
spec.selectedStyle string no - Name of a ComponentStyle manifest to apply. Merged over the _system and _default styles. Maps to the selected-style HTML attribute. selectedStyle: corporate-style
spec.ruleset string no - Name of a RuleSet manifest applied to the page title and inheritable by children via inherited-page / inherited-closest. Maps to the ruleset HTML attribute. ruleset: corporate-rules
Attribute Type Required Default Description Sample
spec.pageNumber string no - Page number displayed in the footer. pageNumber: "1"
spec.footerDisplayPageNumber boolean no true Show or hide the page number in the footer. footerDisplayPageNumber: true
spec.footerText string no - Footer text. footerText: "Internal use only"
spec.messageImage string no "" URL of the message row’s logo/pictogram. A value that does not start with http is looked up in the component’s asset folder. If empty, the image is omitted. messageImage: "debug/concordia.png"
spec.messageText string no "" Message text displayed above the title. Supports inline Markdown and HTML. messageText: "Draft<br />Q3 2026"
Attribute Type Required Default Description Sample
spec.children array no - Array of layout child objects. May be empty or omitted; the page-layout-slots-used lint rule warns when a page referenced by an artefact does not fill its layout slots. see Referencing standalone components
spec.children[].kind string yes - Component type. Values: Text, Table, ChartStructure, ChartTime, ChartScatter, ChartBubble, ChartBullet, Tree, Grid, LayoutCard, Image. Must match the kind of the referenced document when ref is used. kind: ChartStructure
spec.children[].spec object no - Component specification. Required for inline children (without ref); with ref its fields override the referenced document’s spec. spec: { dataset: revenue_by_region }
spec.children[].ref string no - Name (metadata.name) of a standalone document of the same kind used as base spec. LayoutPage cannot be referenced. ref: salesTrendChart
spec.children[].optional boolean no false When true and the ref is missing, the child is skipped gracefully instead of failing the build. optional: true
spec.children[].params object no - Parameter values passed to the referenced document, expanded as ${NAME} in its spec. Only valid together with ref. See LayoutPage Parameters. params: { REGION: "EU" }
spec.children[].metadata object no - Metadata of the inline child. See Inline child constraints. see below
spec.children[].metadata.name string no - Name of the inline child, used in error messages and for identification. name: prodTable
spec.children[].metadata.description string no - Human-readable description of the child. Documentation only; not rendered. description: "Revenue by region"
spec.children[].metadata.constraints array no - Constraint expressions deciding whether the child is included for a given artefact. String or structured format. See Inline child constraints. constraints: ["mode==build"]
spec:
  titleMeasures:
    - name: "Revenue"
      unit: "mEUR"
    - name: "EBIT"
      unit: "mEUR"