The goal of this article is to show which possibilities there are to generate dynamic images. The content container is accessed and URL parameters are considered.
The following is demonstrated:
- First, the system checks whether a content container exists. If not, the SVG is empty.
- The image from the content container is loaded into the SVG graphic, if one exists. To do this, the image ID from the content container is inserted in a replacement variable.
- The heading from the content container is placed over the screen, if one exists.
- The short text of the content container, if one exists, is placed above the image and below the heading. The short text is in an unformatted, multiline text field and is broken down into individual lines. The individual lines are then inserted in an SVG-compatible manner.
- If a URL parameter "box" exists and has the value "true", a semi-transparent rectangle is placed over the image and behind the text.
The following TAL functions are used:
- URL parameter/request
- Container text:separateByComma