Pages

How to set up an app with multiple pages, tracks, summary or multiple layouts.

Multiple layout pages can easily be set up in Altinn Studio, if you want to do it manually, see Setup. There are also some configuration options that are not available in Altinn Studio but must be set manually; for that, see Settings.

Setup

Layout pages are placed in the ui/layouts folder in the app, to configure the order of the layout pages, see Navigation. If you have multiple process steps that require layouts, the structure is slightly different; in that case see Layout sets.

|- App/
  |- ui/
    |- layouts/
      |- side1.json
      |- side2.json
      |- side3.json
    |- Settings.json

Settings

There are several different settings that can be configured for your pages. These settings are configured in the Settings.json file seen in the folder structure above and lie in the pages object. If you use layout sets there is a separate file for each layout set.

{
  "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json",
  "pages": {
    "order": [
      "Info",
      "Form",
      "Summary"
    ],
    "excludeFromPdf": [
      "Info",
      "Summary"
    ],
    "triggers": [
      "calculatePageOrder",
      "validatePage"
    ],
    "hideCloseButton": false,
    "showLanguageSelector": false,
    "showExpandWidthButton": false,
    "showProgress": true,
    "pdfLayoutName": "PDFLayout"
  },
  ...
}

The available settings are the following:

PropertyTypeValue
hideCloseButtonBooleanWhether or not the close button in the upper right corner should be hidden.
showLanguageSelectorBooleanWhether or not the language selector should be visible. Allows the user to switch language after opening the form.
showExpandWidthButtonBooleanWhether or not the expand width button should be visible. Allows the user to expand the width of the page to fill the browser window.
showProgressBooleansee Navigation
pdfLayoutNameStringsee PDF
orderArraysee Navigation
excludeFromPdfArraysee PDF
triggersArraysee Navigation, Tracks