Working with YAML

Portrait uses a yml-file in the backend to configure the whole app. YAML is structured as a XML file, but needs less overhead due to its simplifications.

To make life easier, we collected some of the most import aspects whilst working with yml in terms of Portrait:

Whitespace Indentation

Whitespace indentation is used for denoting structure; however, tab characters are not allowed. One indentation is done with 2 whitespaces:

connections: elo: - connectionIdentifier: 'ix-demo' type: ELO

If a list is given, one entry is denoted with a hyphen (-) and one whitespace.

Comments

A Comment IS written inline and starts with an hash sign:

application: name: Demo Portal owner: Treskon GmbH

Strings

Strings do not require quotation marks. Multi-line strings, are declared with the | character and followed by a newline character:

description: | Hier finden Sie unseren Katalog an Produkten die wir mit 3D-Drucker sofort liefern können. Über die Schaltfläche rechts oben können Sie eine neue Bestellung aufgeben. Die Individualisierung ist nur für gewisse Produkte möglich!"

 

Copyright Treskon GmbH.