Skip to content

Static Content

With "staticContent" static files like HTML pages and sounds can be integrated into insight-explorer and insight-mobile. The HTML pages can be integrated into a navigation module or displayed via a menu. In addition, pages can be shown on the login screen. The "staticContent" can be configured in the ClientConfiguration. The URL to the page can be relative or absolute. Absolute URL's can only be used online. In insight-mobile, relative URL's can be used online and offline if a download package is available. Sound files can be played in validation functions.

Where to place the files?

  • Absolute URLs can be provided on every server.
  • Relative URLs must follow the following conventions:

    • They must be stored parallel to the config.json (in Apps or Electron) and config.js (in Browser)
    • Example:

      config.json
      static-content
       -legal.html
       -help.html
       -style.css
       -my-sound.mp3
      
    • If you would like to have offline support for the staticContent in insight-mobile

    • Example:

      config.json
      static-content
       -legal.html
       -help.html
       -style.css
       -my-sound.mp3
      static-content-1.0.zip
       -static-content
        -legal.html
        -help.html
        -style.css
        -my-sound.mp3
      static-content.json -> {"version": "1.0"}
      
    • For updates of the static-content zip, the version in the static-content.json and the file name of the static-content-1.0.zip must be increased. The mobile client downloads the new version on the next logout/login or refresh of the app.

Example: Page in navigation module with order

    {
     ...
     "staticContent": [
      {
       "name": "legal",
       "title": "Legal",
       "icon": "icon-fire",
       "url": "static-content/legal.html",
       "module": "Infos",
       "order": 5
      },
      {...}
     ]
    }

Example: Hidden page with menu

    Client Configuration:
    {
     ...
     "staticContent": [
      {
       "name": "legal",
       "title": "Legal",
       "icon": "icon-fire",
       "url": "static-content/legal.html",
       "hidden": true
      },
      {...}
     ]
    }
    Menu:
    "menus": [{
     "label": "Legal",
     "icon": "icon-fire",
     "action": "staticContent",
     "actionValues": [{
      "name": "legal"
     }]
    }],

Example: Show page on the login screen

    {
     ...
     "staticContent": [
      {
       "name": "legal",
       "title": "Legal",
       "icon": "icon-fire",
       "url": "static-content/legal.html",
       "loginPage": true
      },
      {...}
     ]
    }