Author:Pascal Morin
License: Free for non-commercial use
Description
This extension lets you display several paragraphs inside a frame. The use of tags allows to
change the font, the style (bold, italic, underline), the size, and the color of characters.
You can also use indentation and bullets.
To do this, 2 methods are available:
- The first one to define your tags:
SetStyle(string tag, string family, string style, int size, string color [, int indent [, string bullet]])
tag: name of the tag family: family of the font style: N (normal) or combination of B, I, U size: size color: color (comma-separated RGB components) indent: to be specified for the paragraph tag; indents the first line by the indicated value bullet : character to use for bullets (typically chr(149)) ; must be used in conjunction with indent
It is possible to use empty strings or null values, except for the paragraph tag. The values
are obtained by inheritance; for instance, with <p><u>, the non-specified values of
<u> are replaced by those from <p>.
- The second one to output text:
WriteTag(float w, float h, string txt [, int border [, string align [, int fill [, mixed padding]]]])
w: width of the line (0 to go from one margin to the other) h: height of a line txt: text to display - must have at least one tag at beginning and end to delimit
a paragraph border: 0 for none, 1 to have a border (default value: 0) align: justification of text: L, R, C or J (default value: J) fill: 0 for none, 1 for background filling (default value: 0) padding: either a numerical value or a string of the form "left, top, bottom, right"
with 2, 3 or 4 specified values (default value: 0)
Example
This example is the beginning of "Little Red Riding Hood" by Charles Perrault. Specific styles
are applied to names of persons, of places, and to verbs.
Bei der Ausführung des Skriptes ist ein Fehler aufgetreten. Irgendetwas funktioniert nicht richtig.
Wie kann ich das Problem lösen?
Öffnen Sie die aktuelle Log-Datei im Ordner var/logs bzw. app/logs und suchen Sie die zugehörige Fehlermeldung (normalerweise die letzte).
Weitere Informationen
Die Skriptausführung wurde gestoppt, weil irgendetwas nicht korrekt funktioniert. Die eigentliche Fehlermeldung wird aus Sicherheitsgründen hinter dieser Meldung verborgen und findet sich in der aktuellen Log-Datei (siehe oben). Wenn Sie die Fehlermeldung nicht verstehen oder nicht wissen, wie das Problem zu beheben ist, durchsuchen Sie die Contao-FAQs oder besuchen Sie die Contao-Supportseite.