Newer
Older
.. ==================================================
.. ==================================================
.. ==================================================
.. Header hierarchy
.. ==
.. --
.. ^^
.. ""
.. ;;
.. ,,
..
.. --------------------------------------------used to the update the records specified ------
.. Best Practice T3 reST: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/CheatSheet.html
.. Reference: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/Index.html
.. Italic *italic*
.. Bold **bold**
.. Code ``text``
.. External Links: `Bootstrap <http://getbootstrap.com/>`_
.. Internal Link: :ref:`downloadButton` (default url text) or :ref:`download Button<downloadButton>` (explicit url text)
.. Add Image: .. image:: ./Images/a4.jpg
..
.. Add image with caption: .. figure:: ./Images/black_dot.png
.. :class: with-border
..
..
.. Admonitions
.. .. note:: .. important:: .. tip:: .. warning::
.. Color: (blue) (orange) (green) (red)
..
.. Definition:
.. some text becomes strong (only one line)
.. description has to indented
.. -*- coding: utf-8 -*- with BOM.
.. include:: Includes.txt
.. _`report`:
Report
======
-------------------
See :ref:`qfq_keywords`.
QFQ content element
-------------------
The QFQ extension is activated through tt-content records. One or more tt-content records per page are necessary to render
*forms* and *reports*. Specify column and language per content record as wished.
The title of the QFQ content element will not be rendered. It's only visible in the backend for orientation of the webmaster.
To display a report on any given TYPO3 page, create a content element of type 'QFQ Element' (plugin) on that page.
A simple example
^^^^^^^^^^^^^^^^
Assume that the database has a table person with columns firstName and lastName. To create a simple list of all persons,
we can do the following::
10.sql = SELECT firstName, lastName FROM Person
The '10' indicates a *root level* of the report (see section :ref:`Structure<Structure>`). The expression '10.sql'
defines an SQL query for the specific level. When the query is executed, it will return a result having one single
column name containing first and last name separated by a space character.
The HTML output, displayed on the page, resulting from only this definition, could look as follows::
JohnDoeJaneMillerFrankStar
I.e., QFQ will simply output the content of the SQL result row after row for each single level.
Format output: mix style and content
""""""""""""""""""""""""""""""""""""
Variant 1: pure SQL
;;;;;;;;;;;;;;;;;;;
To format the upper example, just create additional columns::
10.sql = SELECT firstName, ", ", lastName, "<br>" FROM Person
HTML output::
Doe, John<br>
Miller, Jane<br>
Star, Frank<br>
Variant 2: SQL plus QFQ helper
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
QFQ provides several helper functions to wrap rows and columns, or to separate them. E.g. ``fsep`` stands for `field
separate` and ``rend`` for `row end`::
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
10.sql = SELECT firstName, lastName FROM Person
10.fsep = ', '
10.rend = <br>
HTML output::
Doe, John<br>
Miller, Jane<br>
Star, Frank<br>
Check out all QFQ helpers under :ref:`qfq_keywords`.
Due to mixing style and content, this becomes harder to maintain with more complex layout.
Format output: separate style and content
"""""""""""""""""""""""""""""""""""""""""
The result of the query can be passed to the `Twig template engine <https://twig.symphony.com/>`_
in order to fill a template with the data.::
10.sql = SELECT firstName, lastName FROM Person
10.twig = {% for row in result %}
{{ row.lastName }}, {{ row.firstName }<br />
{% endfor %}
HTML output::
Doe, John<br>
Miller, Jane<br>
Star, Frank<br>
Check out :ref:`using-twig`.
.. _`syntax-of-report`:
Syntax of *report*
------------------
All **root level queries** will be fired in the order specified by 'level' (Integer value).
For **each** row of a query (this means *all* queries), all subqueries will be fired once.
* E.g. if the outer query selects 5 rows, and a nested query select 3 rows, than the total number of rows are 5 x 3 = 15 rows.
There is a set of **variables** that will get replaced before ('count' also after) the SQL-Query gets executed:
``{{<name>[:<store/s>[:...]]}}``
Variables from specific stores.
``{{<name>:R}}`` - use case of the above generic definition. See also :ref:`access-column-values`.
``{{<level>.<columnName>}}``
Similar to ``{{<name>:R}}`` but more specific. There is no sanitize class, escape mode or default value.
See :ref:`variables` for a full list of all available variables.
Different types of SQL queries are possible: SELECT, INSERT, UPDATE, DELETE, SHOW, REPLACE
Only SELECT and SHOW queries will fire subqueries.
Processing of the resulting rows and columns:
* In general, all columns of all rows will be printed out sequentially.
* On a per column base, printing of columns can be suppressed by starting the column name with an underscore '_'. E.g.
This might be useful to store values, which will be used later on in another query via the ``{{id:R}}`` or
``{{<level>.columnName}}`` variable. To suppress printing of a column, use a underscore as column name prefix. E.g.
``SELECT id AS _id``
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
*Reserved column names* have a special meaning and will be processed in a special way. See
:ref:`Processing of columns in the SQL result<Processing of columns in the SQL result>` for details.
There are extensive ways to wrap columns and rows. See :ref:`wrapping-rows-and-columns`
.. _`using-twig`:
Using Twig
----------
How to write Twig templates is documented by the `Twig Project <https://twig.symphony.com/>`_.
QFQ passes the result of a given query to the corresponding Twig template using the Twig variable
`result`. So templates need to use this variable to access the result of a query.
Specifying a Template
^^^^^^^^^^^^^^^^^^^^^
By default the string passed to the **twig**-key is used as template directly,
as shown in the simple example above::
10.twig = {% for row in result %}
{{ row.lastName }}, {{ row.firstName }<br />
{% endfor %}
However, if the string starts with **file:**, the template is read from the
file specified.::
10.twig = file:table_sortable.html.twig
The file is searched relative to *<site path>* and if the file is not found there, it's searched relative to
QFQ's *twig_template* folder where the included base templates are stored.
The following templates are available:
``tables/default.html.twig``
A basic table with column headers, sorting and column filters using tablesorter and bootstrap.
``tables/single_vertical.html.twig``
A template to display the values of a single record in a vertical table.
Links
^^^^^
The link syntax described in :ref:`column-link` is available inside Twig templates
using the `qfqlink` filter::
{{ "u:http://www.example.com" | qfqlink }}
will render a link to *http://www.example.com*.
^^^^^^^^^^^
A String can be JSON decoded in Twig the following way::
{% set decoded = '["this is one", "this is two"]' | json_decode%}
This can then be used as a normal object in Twig::
{{ decoded[0] }}
will render *this is one*.
Available Store Variables
^^^^^^^^^^^^^^^^^^^^^^^^^
QFQ also provides access to the following stores via the template context.
- record
- sip
- typo3
- user
- system
- var
All stores are accessed using their lower case name as attribute of the
context variable `store`. The active Typo3 front-end user is therefore available as::
{{ store.typo3.feUser }}
Example
^^^^^^^
The following block shows an example of a QFQ report.
*10.sql* selects all users who have been assigned files in our file tracker.
.. TODO use content = hide instead of _user once this is implemented
*10.10* then selects all files belonging to this user, prints the username as header
and then displays the files in a nice table with links to the files. ::
10.sql = SELECT assigned_to AS _user FROM FileTracker
WHERE assigned_to IS NOT NULL
GROUP BY _user
ORDER BY _user
10.10.sql = SELECT id, path_scan FROM FileTracker
WHERE assigned_to = '{{user:R}}'
10.10.twig = <h2>{{ store.record.user }}</h2>

Carsten Rose
committed
<table class="table table-hover tablesorter" id="{{pageSlug:T}}-twig">
<thead><tr><th>ID</th><th>File</th></tr></thead>
<tbody>
{% for row in result %}
<tr>
<td>{{ row.id }}</td>
<td>{{ ("d:|M:pdf|s|t:"~ row.path_scan ~"|F:" ~ row.path_scan ) | qfqlink }}</td>
</tr>
{% endfor %}
</tbody>
</table>
Reserved names
--------------
The following names have a special meaning in QFQ/Typo3. It is recommended to use such names only in the meaning of
QFQ/Typo3 and not to use them as free defineable user variables.
``id``, ``type``, ``L``, ``form``, ``r``
Debug the bodytext
------------------
The parsed bodytext could be displayed by activating 'showDebugInfo' (:ref:`debug`) and specifying::
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
debugShowBodyText = 1
A small symbol with a tooltip will be shown, where the content record will be displayed on the webpage.
Note: :ref:`debug` information will only be shown with *showDebugInfo: yes* in :ref:`configuration`.
.. _`inline-report`:
Inline Report editing
---------------------
For quick changes it can be bothersome to go to the TYPO3 backend to update the page content and reload the page.
For this reason, QFQ offers an inline report editing feature whenever there is a TYPO3 BE user logged in. A small
link symbol will appear on the right-hand side of each report record. Please note that the TYPO3 Frontend cache
is also deleted upon each inline report save.
In order for the inline report editing to work, QFQ needs to be able to access the T3 database. This database
is assumed to be accessible with the same credentials as specified with indexQfq.
.. _`Structure`:
Structure
---------
A report can be divided into several levels. This can make report definitions more readable because it allows for
splitting of otherwise excessively long SQL queries. For example, if your SQL query on the root level selects a number
of person records from your person table, you can use the SQL query on the second level to look up the city where each
person lives.
See the example below::
10.sql = SELECT id AS _pId, CONCAT(firstName, " ", lastName, " ") AS name FROM Person
10.rsep = <br>
10.10.sql = SELECT CONCAT(postal_code, " ", city) FROM Address WHERE pId = {{10.pId}}
10.10.rbeg = (
10.10.rend = )
This would result in::
John Doe (3004 Bern)
Jane Miller (8008 Zürich)
Frank Star (3012 Bern)
Text across several lines
^^^^^^^^^^^^^^^^^^^^^^^^^
To get better human readable SQL queries, it's possible to split a line across several lines. Lines
with keywords are on their own (:ref:`QFQ Keywords (Bodytext)<qfq_keywords>` start a new line). If a line is not a
'keyword' line, it will be appended to the last keyword line. 'Keyword' lines are detected on::
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
Example::
10.sql = SELECT 'hello world'
FROM Mastertable
10.tail = End
20.sql = SELECT 'a warm welcome'
'some additional', 'columns'
FROM AnotherTable
WHERE id>100
20.head = <h3>
20.tail = </h3>
Join mode: SQL
""""""""""""""
This is the default. All lines are joined with a *space* in between. E.g.::
10.sql = SELECT 'hello world'
FROM Mastertable
Results to: ``10.sql = SELECT 'hello world' FROM Mastertable``
Notice the space between "...world'" and "FROM ...".
Join mode: strip whitespace
"""""""""""""""""""""""""""
Ending a line with a \\ strips all leading and trailing whitespaces of that line joins the line directly (no extra
space in between). E.g.::
10.sql = SELECT 'hello world', 'd:final.pdf \

Carsten Rose
committed
|p:/export \
|t:Download' AS _pdf \

Carsten Rose
committed
Results to: ``10.sql = SELECT 'hello world', 'd:final.pdf|p:/export|t:Download' AS _pdf``
Note: the \\ does not force the joining, it only removes the whitespaces.
To get the same result, the following is also possible::
10.sql = SELECT 'hello world', CONCAT('d:final.pdf'

Carsten Rose
committed
'|p:/export',
'|t:Download') AS _pdf
Nesting of levels: `numeric`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Levels can be nested. E.g.::
10 {
sql = SELECT ...
5 {
sql = SELECT ...
head = ...
}
}
This is equal to::
10.sql = SELECT ...
10.5.sql = SELECT ...
10.5.head = ...
Nesting of levels: `alias`
^^^^^^^^^^^^^^^^^^^^^^^^^^
Levels can be nested without levels. E.g.::
{
sql = SELECT ...
{
sql = SELECT ...
head = ...
}
}
This is equal to::
1.sql = SELECT ...
1.2.sql = SELECT ...
1.2.head = ...
Levels are automatically numbered from top to bottom.
An alias can be used instead of levels. E.g.::
myAlias {
sql = SELECT ...
sql = SELECT ...
head = ...
}
}
This is also equal to::
1.sql = SELECT ...
1.2.sql = SELECT ...
1.2.head = ...
.. important::

Jan Haller
committed
Allowed characters for an alias: [a-zA-Z0-9_-].
.. important::
The first level determines whether report notation `numeric` or `alias` is used. Using an alias or no level triggers
report notation `alias`. It requires the use of delimiters throughout the report. A combination with the notation
'10.sql = ...' is not possible.
.. important::
Report notation `alias` does not require that each level be assigned an alias. If an alias is used, it must be on the
same line as the opening delimiter.
Leading / trailing spaces
^^^^^^^^^^^^^^^^^^^^^^^^^
By default, leading or trailing whitespaces are removed from strings behind '='. E.g. 'rend = test ' becomes 'test' for
rend. To prevent any leading or trailing spaces, surround them by using single or double ticks. Example::
10.sql = SELECT name FROM Person
10.rsep = ' '
10.head = "Names: "
Braces character for nesting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default, curly braces '{}' are used for nesting. Alternatively angle braces '<>', round braces '()' or square
braces '[]' are also possible. To define the braces to use, the **first line** of the bodytext has to be a comment line
and the last character of that line must be one of '{[(<'. The corresponding braces are used for that QFQ record. E.g.::
# Specific code. >
10 <
sql = SELECT
head = <script>
data = [
{
10, 20
}
]
</script>
>
Per QFQ tt-content record, only one type of nesting braces can be used.
- write nothing else than whitespaces/newline behind an **open brace**
- the **closing brace** has to be alone on a line
Example::
10.sql = SELECT 'Yearly Report'
sql = SELECT companyName FROM Company LIMIT 1
head = <h1>
tail = </h1>
sql = SELECT depName FROM Department
head = <p>
tail = </p>
5 {
sql = SELECT 'detailed information for department'
1.sql = SELECT name FROM Person LIMIT 7
1.head = Employees:
}
30.5.tail = More will follow
sql = SELECT 'A query with braces on their own'
.. _`access-column-values`:
Access column values
^^^^^^^^^^^^^^^^^^^^
Columns of the upper / outer level result can be accessed via variables in two ways
* STORE_RECORD: ``{{pId:R}}``
* Level Key: ``{{10.pId}}``
The STORE_RECORD will always be merged with previous content. The Level Keys are unique.
Multiple columns, with the same column name, can't be accessed individually. Only the last column is available.
Retrieving the *final* value of :ref:`special-column-names` is possible via '{{&<column>:R}} (there is an '&' direct behind '{{')
10.sql = SELECT 'p:/home?form=Person|s|b:success|t:Edit' AS _link
10.20.sql = SELECT '{{link:R}}', '{{&link:R}}'
The first column of row ``10.20`` returns ``p:/home?form=Person|s|b:success|t:Edit``,the second column returns
'<span class="btn btn-success"><a href="?home&s=badcaffee1234">Edit</a></span>'.
Example STORE_RECORD::
10.sql= SELECT p.id AS _pId, p.name FROM Person AS p
10.5.sql = SELECT adr.city, 'dummy' AS _pId FROM Address AS adr WHERE adr.pId={{pId:R}}
10.5.20.sql = SELECT '{{pId:R}}'
10.10.sql = SELECT '{{pId:R}}'
The line '10.10' will output 'dummy' in cases where there is at least one corresponding address.
If there are no addresses (all persons) it reports the person id.
If there is at least one address, it reports 'dummy', cause that's the last stored content.
Example 'level'::
10.sql= SELECT p.id AS _pId, p.name FROM Person AS p
10.5.sql = SELECT adr.city, 'dummy' AS _pId FROM Address AS adr WHERE adr.pId={{10.pId}}
10.5.20.sql = SELECT '{{10.pId}}'
10.10.sql = SELECT '{{10.pId}}'
Example 'alias'::
myAlias {
sql = SELECT p.id AS _pId, p.name FROM Person AS p
myAlias2 {
sql = SELECT adr.city, 'dummy' AS _pId FROM Address AS adr WHERE adr.pId={{10.pId}}
myAlias3 {
sql = SELECT '{{myAlias.pId}}'
}
}
myAlias4 {
sql = SELECT '{{myAlias.pId}}'
}
}
Notes to the level:
+-------------+------------------------------------------------------------------------------------------------------------------------+
| Levels |A report is divided into levels. The Example has levels *10*, *20*, *30*, *30.5*, *30.5.1*, *50* |
+-------------+------------------------------------------------------------------------------------------------------------------------+
| Qualifier |A level is divided into qualifiers *30.5.1* has 3 qualifiers *30*, *5*, *1* |
+-------------+------------------------------------------------------------------------------------------------------------------------+
| Root levels |Is a level with one qualifier. E.g.: 10 |
+-------------+------------------------------------------------------------------------------------------------------------------------+
| Sub levels |Is a level with more than one qualifier. E.g. levels *30.5* or *30.5.1* |
+-------------+------------------------------------------------------------------------------------------------------------------------+
| Child |The level *30* has one child and child child: *30.5* and *30.5.1* |
+-------------+------------------------------------------------------------------------------------------------------------------------+
| Alias |A variable that can be assigned to a level and used to retrieve its values. |
+-------------+------------------------------------------------------------------------------------------------------------------------+
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
| Example | *10*, *20*, *30*, *50** are root level and will be completely processed one after each other. |
| | *30.5* will be executed as many times as *30* has row numbers. |
| | *30.5.1* will be executed as many times as *30.5* has row numbers. |
+-------------+------------------------------------------------------------------------------------------------------------------------+
Report Example 1::
# Displays current date
10.sql = SELECT CURDATE()
# Show all students from the person table
20.sql = SELECT p.id AS pId, p.firstName, " - ", p.lastName FROM Person AS p WHERE p.typ LIKE "student"
# Show all the marks from the current student ordered chronological
20.25.sql = SELECT e.mark FROM Exam AS e WHERE e.pId={{20.pId}} ORDER BY e.date
# This query will never be fired, cause there is no direct parent called 20.30.
20.30.10.sql = SELECT 'never fired'
.. _wrapping-rows-and-columns:
Wrapping rows and columns: Level
--------------------------------
Order and nesting of queries, will be defined with a TypoScript-alike syntax::
level.sublevel1.subsublevel2. ...
* Each 'level' directive needs a final key, e.g: 20.30.10. **sql**.
* A key **sql** is necessary in order to process a level.
See all :ref:`QFQ Keywords (Bodytext)<qfq_keywords>`.
.. _`Processing of columns in the SQL result`:
Processing of columns in the SQL result
---------------------------------------
* The content of all columns of all rows will be printed sequentially, without separator (except one is defined).
* Rows with :ref:`special-column-names` will be rendered internally by QFQ and the QFQ output of such processing (if there
is any) is taken as the content.
.. _special-column-names:
Special column names
--------------------
.. note::
Twig: respect that the 'special column name'-columns are rendered before Twig becomes active. The recommended
way by using Twig is *not to use* special column names at all. Use the Twig version *qfqLink*.
QFQ don't care about the content of any SQL-Query - it just copy the content to the output (=Browser).
One exception are columns, whose name starts with '_'. E.g.::
10.sql = SELECT 'All', 'cats' AS red, 'are' AS _green, 'grey in the night' AS _link
* The first and second column are regular columns. No QFQ processing.
* The third column (alias name 'green') is no QFQ special column name, but has an '_' at the beginning: this column
content will be hidden.
* The fourth column (alias name 'link') uses a QFQ special column name. Here, only in this example, it has no
further meaning.
* All columns in a row, with the same special column name (e.g. ``... AS _page``) will have the same column name: 'page'.
To access individual columns a uniq column title is necessary and can be added ``...|column1``::
10.sql = SELECT '..1..' AS '_page|column1', '..2..' AS '_page|column2'
Those columns can be accessed via ``{{column1:R}}`` , ``{{column2:R}}`` (recommended) or ``{{10.column1}}`` , ``{{10.column2}}``.
* To skip wrapping via ``fbeg``, ``fsep``, ``fend`` for dedicated columns, add the keyword ``|_noWrap`` to the column alias.
Example::
10.sql = SELECT 'world' AS 'title|_noWrap'
Summary:
* For 'special column names': the column name together with the value controls how QFQ processes the column.
* Special column names always start with '_'.
* Important: to reference a column, the name has to be given without '_'. E.g. ``SELECT 'cat' AS _pet`` will be used with
``{{pet:R}}`` (notice the missing '_').
* Columns starting with a '_' but not defined as as QFQ special column name are hidden(!) - in other words: they are
not **printed** as output.
* Tip: if a column name starts with '_' the column name becomes '_....' - which will be hidden! To be safe: always
define an alias!
* Access to 'hidden' columns via ``{{<level>.<column>}}`` or ``{{<column>:R}}`` are possible and often used.
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Reserved column name | Purpose |
+========================+=============================================================================================================================================================================================+
| _link | :ref:`column-link` - Build links with different features. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _pageX or _PageX | :ref:`column_pageX` - Shortcut version of the link interface for fast creation of internal links. The column name is composed of the string *page*/*Page* |
| | and a optional character to specify the type of the link. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _download | :ref:`download` - single file (any type) or concatenate multiple files (PDF, ZIP) |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _pdf, _file, _zip | :ref:`column_pdf` - Shortcut version of the link interface for fast creation of :ref:`download` links. Used to offer single file download or to concatenate several |
| _Pdf, _File, _Zip | PDFs and printout of websites to one PDF file. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _savePdf | :ref:`column-save-pdf` - pre render PDF files |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _saveZip | :ref:`column-save-zip` - Generate and save zip file. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _excel | :ref:`excel-export` - creates Excel exports based on QFQ Report queries, optional with pre uploaded Excel template files |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _yank | :ref:`copyToClipboard`. Shortcut version of the link interface |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _mailto | :ref:`column_mailto` - Build email links. A click on the link will open the default mailer. The address is encrypted via JS against email bots. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _sendmail | :ref:`column_sendmail` - Send emails. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _exec | :ref:`column_exec` - Run batch files or executables on the webserver. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _script | :ref:`column_script` - Run php function defined in an external script. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _vertical | :ref:`column_vertical` - Render Text vertically. This is useful for tables with limited column width. See also same effect done via CSS (ref:`vertical-text-via-css`) |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _img | :ref:`column_img` - Display images. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _bullet |Display a blue/gray/green/orange/pink/red/yellow bullet. If none color specified, show nothing. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _check |Display a blue/gray/green/pink/red/yellow checked sign. If none color specified, show nothing. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _nl2br |All newline characters will be converted to ``<br>``. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _striptags |HTML Tags will be stripped. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _htmlentities |Characters will be encoded to their HTML entity representation. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _fileSize |Show file size of a given file |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _mimeType |Show mime type of a given file |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _thumbnail | :ref:`thumbnail<thumbnail>` - Create thumbnails on the fly. See :ref:`column-thumbnail`. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _monitor | :ref:`column-monitor` - Constantly display a file. See :ref:`column-monitor`. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _XLS |Used for Excel export. Append a `newline` character at the end of the string. Token must be part of string. See :ref:`excel-export`. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _XLSs |Used for Excel export. Prepend the token 's=' and append a `newline` character at the string. See :ref:`excel-export`. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _XLSb |Used for Excel export. Like '_XLSs' but encode the string base64. See :ref:`excel-export`. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _XLSn |Used for Excel export. Prepend 'n=' and append a `newline` character around the string. See :ref:`excel-export`. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _noWrap |Skip wrapping via ``fbeg``, ``fsep``, ``fend``. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _hide |Hide a column with a special column name (like ``... AS _link``). Note: regular columns should be hidden by using '_' as the first letter of the column name. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _+<html-tag attributes>|The content will be wrapped with '<html-tag attributes>'. Example: ``SELECT 'example' AS '_+a href="http://example.com"'`` creates ``'<a href="http://example.com">example</a>'`` |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| _=<varname> |The content will be saved in store 'user' under 'varname'. Retrieve it later via ``{{varname:U}}``. Example: ``'SELECT "Hello world" AS _=text'``. |
| |See :ref:`STORE_USER`, :ref:`store_user_examples` |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|_<nonReservedName> |Suppress output. Column names with leading underscore are used to select data from the database and make it available in other parts of the report without generating any output. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|_formJson |System internal. Return form with given id as JSON string. (``SELECT 'fid:<formId>[\|reduce][\|b64]' AS _formJson``). |
| |Flag ``reduce`` filters out 'modified', 'created' as well as keys which hold default values. |
| |Flag ``b64`` encodes the JSON string in base 64. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
|_encrypt |:ref:`column-encrypt` - Encrypt value. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
|_decrypt |:ref:`column-decrypt` - Decrypt value. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|_jwt |:ref:`column-jwt` - generates a json web token from the provided data. |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. _column-link:
Column: _link
^^^^^^^^^^^^^
* Most URLs will be rendered via class link.
* Column names like ``_pagee`, ``_mailto``, ... are wrapper to class link.
* The parameters for link contains a prefix to make them position-independent.
* Parameter have to be separated with '|'. If '|' is part of the value, it needs to be escaped '\\|'. This can be done
via QFQ SQL function ``QBAR()`` - see :ref:`qbar-escape-qfq-delimiter`.
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|URL|IMG|Meaning |Qualifier |Example |Description |
+===+===+==============+===================================+===========================+========================================================================================================================================+
|x | |URL |u:<url> |u:http://www.example.com |If an image is specified, it will be rendered inside the link, default link class: external |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|x | |Mail |m:<email> |m:info@example.com |Default link class: email |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
|x | |Page |p:<pageSlug> |p:/impressum?foo=bar |Append optional GET parameters afeter '?', no hostname qualifier (automatically set by browser) |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|x | |Download |d:[<exportFilename>] |d:complete.pdf |Link points to ``.../typo3conf/ext/qfq/Api/download.php``. Additional parameter SIP encoded. 'Download' needs SIP. See :ref:`download`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|x | |Copy to |y:[some content] |y:this will be copied |Click on it copies the value of 'y:' to the clipboard. Optional a file ('F:...') might be specified as source. |
| | |clipboard | | |See :ref:`copyToClipboard`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
| | |Dropdown menu |z |z||p:/home|t:Home |Creates a dropdown menu. See :ref:`dropdownMenu`. |

Carsten Rose
committed
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |websocket |w:ws://<host>:<port>/<path> | w:ws://localhost:123/demo |Send message given in 't:...' to websocket. See :ref:`websocket`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Text |t:<text> |t:Firstname Lastname | |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Render |r:<mode> |r:3 |See: :ref:`render-mode`, Default: 0 |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Button | b[:0|1|<btn class>[ btn-small]] | b:0, b:1, b:success |'b', 'b:1': with Bootstrap class 'btn btn-...'. 'b:0' no Bootstrap class. <btn class>: default, primary, success, info, warning,danger. |
| | | | | | To make the button smaller, add `btn-small` or `btn-tiny`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Picture |P:<filename> |P:bullet-red.gif |Picture '<img src="bullet-red.gif"alt="....">'. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Edit |E |E |Show 'edit' icon as image |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |New |N |N |Show 'new' icon as image |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Delete |D |D |Show 'delete' icon as image (only the icon, no database record 'delete' functionality) |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Help |H |H |Show 'help' icon as image |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Info |I |I |Show 'information' icon as image |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Show |S |S |Show 'show' icon as image |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Glyph |G:<glyphname> |G:glyphicon-envelope |Show <glyphname>. Check: :ref:`bootstrap' |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Bullet |B:[<color>] |B:green |Show bullet with '<color>'. Colors: blue, gray, green, orange, pink, red, yellow. Default Color: green. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Check |C:[<color>] |C:green |Show checked with '<color>'. Colors: blue, gray, green, pink, red, yellow. Default Color: green. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| |x |Thumbnail |T:<pathFileName> |T:fileadmin/file.pdf |Creates a thumbnail on the fly. Size is specified via 'W'. See :ref:`column-thumbnail` |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Dimension |W:[width]x[height] |W:50x , W:x60 , W:50x60 |Defines the pixel size of thumbnail. See :ref:`column-thumbnail` |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |URL Params |U:<key1>=<value1>[&<keyN>=<valueN>]|U:a=value1&b=value2&c=... |Any number of additional Params. Links to forms: U:form=Person&r=1234. Used to create 'record delete'-links. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Tooltip |o:<text> |o:More information here |Tooltip text |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | | Order |Y:<value> |Y:{{p.id:R}} |Value wrapped in `<span style="display: none;">` (hidden) left to rendered link. Use: possibility to order/filter links/buttons in a |
| | |(invisible) | | |column of a html table via tablesorter. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Alttext |a:<text> |a:Name of person |a) Alttext for images, b) Message text for :ref:`download` popup window. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Class |c:[n|<text>] |c:text-muted |CSS class for link. n:no class attribute, <text>: explicit named |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Attribute |A:<key>="<value"> |A:data-reference="person" |Custom attributes and a corresponding value. Might be used by application tests. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Target |g:<text> |g:_blank |target=_blank,_self,_parent,<custom>. Default: no target |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Question |q:<text> |q:please confirm |See: :ref:`question`. Link will be executed only if user clicks ok/cancel, default: 'Please confirm' |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Encryption |e:0|1|... |e:1 |Encryption of the e-mail: 0: no encryption, 1:via Javascript (default) |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Right |R |R |Defines picture position: Default is 'left' (no definition) of the 'text'. 'R' means 'right' of the 'text' |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |SIP |s[:0|1] |s, s:0, s:1 |If 's' or 's:1' a SIP entry is generated with all non Typo 3 Parameters. The URL contains only parameter 's' and Typo 3 parameter |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Mode |M:file|pdf|qfqpdf|zip |M:file, M:pdf, M:qfqpdf, |Mode. Used to specify type of download. One or more element sources needs to be configured. See :ref:`download`. |
| | | | |M:zip | |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Text before |v:text before link |v:Some Text |Useful to show text before a link, delivered through `... AS _link`. See :ref:`linkTextBeforeAfter` |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Text after |V:text after link |V:Some Text |Useful to show text after a link, delivered through `... AS _link`. See :ref:`linkTextBeforeAfter` |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |File |F:<filename> |F:fileadmin/file.pdf |Element source for download mode file|pdf|zip. See :ref:`download`. |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Delete record | x[:a|r|c] |x, x:r, x:c |a: ajax (only QFQ internal used), r: report (default), c: close (current page, open last page) |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
| | |Cache | cache[:table/id[/column]][,]] |cache, |See :ref:`cache` |
| | | | |cache:table1/23/column | |
+---+---+--------------+-----------------------------------+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
.. _render-mode:
Render mode
^^^^^^^^^^^
The following table might be hard to read - but it's really useful to understand. It solves a lot of different situations.
If there are no special condition (like missing value, or suppressed links), render mode 0 is sufficient.
But if the URL text is missing, or the URL is missing, OR the link should be rendered in sql row 1-10, but not 5, then
render mode might dynamically control the rendered link.
* Column *Mode* is the render mode and controls how the link is rendered.
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|Mode |Given: url & text |Given: only url | Given: only text |Description |
+============+=====================+====================+==================+===========================================================================+
|0 (default) |<a href=url>text</a> |<a href=url>url</a> | |text or image will be shown, only if there is a url, page or mailto |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|1 |<a href=url>text</a> |<a href=url>url</a> |text |text or image will be shown, independently of whether there is a url or not|
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|2 |<a href=url>text</a> | | |no link if text is empty |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|3 |text |url |text |no link, only text or image, incl. Optional tooltip. For Bootstrap buttons |
| | | | | r:3 will set the button to disable and no link/sip is rendered. |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|4 |url |url |text |no link, show text, if text is empty, show url, incl. optional tooltip |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|5 | | | |nothing at all |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|6 | pure text | |pure text |no link, pure text |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
|7 | pure url |pure url | |no link, pure url |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+

Carsten Rose
committed
|8 | pure sip |pure sip | |no link, no html, only the 13 digit sip code. |
+------------+---------------------+--------------------+------------------+---------------------------------------------------------------------------+
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
Example::
10.sql = SELECT CONCAT('u:', p.homepage, IF(p.showHomepage='yes', '|r:0', '|r:5') ) AS _link FROM Person AS p
Tip:
An easy way to switch between different options of rendering a link, incl. Bootstrap buttons, is to use the render mode.
* no render mode or 'r:0' - the full functional link/button.
* 'r:3' - the link/button is rendered with text/image/glyph/tooltip ... but without a HTML a-tag! For Bootstrap button, the button get the 'disabled' class.
* 'r:5' - no link/button at all.
Link Examples
^^^^^^^^^^^^^
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|SQL-Query | Result |
+=======================================================================+=========================================================================================================================================+
| SELECT "m:info@example.com" AS _link | info@example.com as linked text, encrypted with javascript, class=external |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "m:info@example.com|c:0" AS _link | info@example.com as linked text, not encrypted, class=external |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "m:info@example.com|P:mail.gif" AS _link | info@example.com as linked image mail.gif, encrypted with javascript, class=external |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "m:info@example.com|P:mail.gif|o:Email" AS _link | *info@example.com* as linked image mail.gif, encrypted with javascript, class=external, tooltip: "sendmail" |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "m:info@example.com|t:mailto:info@example.com|o:Email" AS link | 'mail to *info@example.com*' as linked text, encrypted with javascript, class=external |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "u:www.example.com" AS _link | www.example as link, class=external |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "u:http://www.example.com" AS _link | *http://www.example* as link, class=external |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "u:www.example.com|q:Please confirm" AS _link | www.example as link, class=external, See: :ref:`question` |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "u:www.example.com|c:nicelink" AS _link | *http://www.example* as link, class=nicelink |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
| SELECT "p:/form_person?note=Text|t:Person" AS _link | <a href="/form_person?note=Text">Person</a> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
| SELECT "p:/form_person|E" AS _link | <a href="/form_person"><img alttext="Edit" src="typo3conf/ext/qfq/Resources/Public/icons/edit.gif"></a> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
| SELECT "p:/form_person|E|g:_blank" AS _link | <a target="_blank" href="/form_person"><img alttext="Edit" src="typo3conf/ext/qfq/Resources/Public/icons/edit.gif"></a> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
| SELECT "p:/form_person|C" AS _link | <a href="/form_person"><img alttext="Check" src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif"></a> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
| SELECT "p:/form_person|C:green" AS _link | <a href="/form_person"><img alttext="Check" src="typo3conf/ext/qfq/Resources/Public/icons/checked-green.gif"></a> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "U:form=Person&r=123|x|D" as _link | <a href="typo3conf/ext/qfq/Classes/Api/delete.php?s=badcaffee1234"><span class="glyphicon glyphicon-trash" ></span>"></a> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "U:form=Person&r=123|x|t:Delete" as _link | <a href="typo3conf/ext/qfq/Classes/Api/delete.php?s=badcaffee1234">Delete</a> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

Carsten Rose
committed
| SELECT "s:1|d:full.pdf|M:pdf|p:id=det1&r=12|p:/det2|F:cv.pdf| | <a href="typo3conf/ext/qfq/Classes/Api/download.php?s=badcaffee1234">Download</a> |
| t:Download|a:Create complete PDF - please wait" as _link | |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "y:iatae3Ieem0jeet|t:Password|o:Clipboard|b" AS _link | <button class="btn btn-info" onClick="new QfqNS.Clipboard({text: 'iatae3Ieem0jeet'});" title='Copy to clipboard'>Password</button> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "y|s:1|F:dir/data.R|t:Data|o:Clipboard|b" AS _link | <button class="btn btn-info" onClick="new QfqNS.Clipboard({uri: 'typo3conf/.../download.php?s=badcaffee1234'});" |
| | title='Copy to clipboard'>Data</button> |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
| SELECT "p:/form_person|v:Hello |V: world.|t:Link" AS _link | 'Hello <a href="/form_person">Link</a> world.' |
+-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
Alert: Question
^^^^^^^^^^^^^^^
**Syntax**
::
q[:<alert text>[:<level>[:<positive button text>[:<negative button text>[:<timeout>[:<flag modal>]]]]]]
* If a user clicks on a link, an alert is shown. If the user answers the alert by clicking on the 'positive button', the browser opens the specified link.
If the user click on the negative answer (or waits for timout), the alert is closed and the browser does nothing.
* All parameter are optional.
* Parameter are separated by ':'
* To use ':' inside the text, the colon has to be escaped by \\. E.g. 'ok\\ : I understand'.