Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As you can see, custom URIs are used here in order to point to locations for the model and the template.

...

In this section some of the core concepts of the FreeMarker template language will be shown.

For more details visit their Official FreeMarker Documentation.

Accessing values (interpolation)

In order to access a value from a model and write it at a certain position in the template, you can use ${variablePath} whereas variablePath points to the path of the value inside the model. Let's assume you have a JSON model like this:

...

Which will create this output after template was rendered:

Code Block
Hello Markus!

Iterating list values

Sometimes it is necessary to iterate over a list from a model like this:

...

For more details about iterating model data structures, see FreeMarker Documentation.

Conditional output (if, else, elseif)

In case you would like to generate an output only in case a certain criteria matches, you can use the if, else, elseif structure.

...