Export templates
With export templates, super admins create own outputs for the offers of a season: PDF, XML, Word file or spreadsheet.
Location: Settings > Exports. Visible to: super admins.
| Rule | Content |
|---|---|
| Access | All pages under Exports are reserved for super admins. |
| Scope | Templates and fonts belong to the tenant. |
| In the export | A template with Offer in the export appears in the tab Export of a season under Format, in the section Own templates (Export). The same templates are available in the proof, on the season page and in the export in the background. |
Templates
The page has two lists, switched with the selection Templates and Fonts. The number behind each names the entries of the list.
| Element | Content |
|---|---|
| Template | Name of the template. Below it, PDF and XML show the file name with the ending .html.twig or .xml.twig, Word shows the name of the uploaded file or “no file yet”, XLSX shows the file name with .xlsx. |
| Output | Type of the template: HTML → PDF, XML, DOCX or XLSX |
| Page · font | PDF: page size, “portrait” or “landscape”, base font and font size, e.g. “A4 portrait · geist 11 pt”. Word: number of placeholders in the file. XLSX: number of columns and name of the sheet. XML: “UTF-8”. |
| In export | offered or Draft |
| Modified | Date and name of the person who saved last |
| Badge Installation | The template is in the configuration of the installation and read-only. |
| New template | Menu with the 4 types; the choice creates a template as a draft and opens the editor. |
| Empty list | “No templates yet.” with “Create one – a programme booklet as PDF, typesetting data as XML or a Word file with placeholders.” |
Above the list it says: “Templates are Twig. A PDF template writes HTML that mPDF typesets; an XML template is output as written; a DOCX template is a Word file with placeholders. Offered templates appear under “Format” in a season’s export.”
Types
| Type | Entry in New template | Starts with | Result |
|---|---|---|---|
| PDF from HTML with “.html.twig · typeset with mPDF” | A template with title and short description per offer | PDF, typeset with the page size, margins and base font of the template | |
| XML | XML with “.xml.twig · output unchanged” | A template with number and title per offer | XML, output as the template writes it |
| Word | DOCX with “Upload a Word file · placeholders are replaced” | No file | Word document in which fepli replaces the placeholders |
| Spreadsheet | XLSX with “Put columns together · fields, answers, formulas” | The columns Title, Hosts and Date | Excel file with one sheet |
A new template is called New PDF template, New XML template, New DOCX template or New XLSX template and is a draft.
Templates of the installation
The PDF and XML outputs that the installation sets in its configuration appear in the list with the badge Installation. Word and calendar outputs of the installation do not appear there.
| Element | Content |
|---|---|
| Page of a template of the installation | The editor shows settings and source text, all fields are locked. Notice: “From the installation.” with “Configured in {key} and read-only here. “Adopt as template” creates an editable copy.” |
| Adopt as template | Creates a copy named “{name} (copy)” as a draft and opens it in the editor. Message: ““{name}” has been created – a draft, not in the export yet.” |
Editor
On the left, the editor has the settings of the template. In the middle are the source text, the Word file or the table. On the right are the preview or the variables.
| Element | Content |
|---|---|
| Arrow to the left | Back to the templates |
| Name in the header | Name of the template; “Untitled” while the field is empty |
| Badge Not saved | The editor holds changes that are not saved yet. |
| Proof PDF, Proof XML, Proof DOCX, Proof XLSX | Creates the export of the season that currently has an editing phase, in the background. The file arrives under the bell. It holds the saved version, not the changes in the editor. The button is locked while the template has an error. |
| Save | Saves the template. Locked while nothing is changed. |
Settings
| Field | Meaning | Values | Default |
|---|---|---|---|
| Name | This is how the template appears in the export. Required. | Text | New PDF template etc. |
| Output | Type of the template. Switching changes what the middle shows. | HTML → PDF, XML, DOCX, XLSX | Type of the new template |
| File name of the export | Start of the file name. The help text reads “With season and date, e.g. {example}”. | Text | export |
| Sheet | Name of the sheet in the Excel file. XLSX only. | up to 31 characters, without [ ] : * ? / \ | Offers |
| One row per | XLSX only. With Date, an offer with 3 dates makes 3 rows. | Offer, Date | Offer |
| Page size | PDF only | A4, A5, A6 | A4 |
| Portrait, Landscape | Orientation of the page. PDF only. | Portrait, Landscape | Portrait |
| Margins in mm | Distance from the edge of the page: Top, Right, Bottom, Left. PDF only. | 0 to 40 | 15 |
| Base font | Font of the whole document. The selection names the supplied and the uploaded fonts (Fonts). PDF only. | Name of a font | Geist |
| Font size | In pt. PDF only. | 6 to 24, in steps of 0.5 | 11 |
| Offer in the export | Makes the template available in the export of a season. Turned off, it stays a draft. | on, off | off |
| Delete template | Deletes the template after a question: “Delete “{name}”?” with “The template will no longer be in the export. This cannot be undone.” Message afterwards: ““{name}” has been deleted.” |
Saving
| Case | Message |
|---|---|
| Template saved, Offer in the export on | ““{name}” has been saved and is available in the export.” |
| Template saved, Offer in the export off | ““{name}” has been saved – a draft, not in the export yet.” |
| The field Name is empty | “Not saved: The template needs a name.” |
| PDF, XML or XLSX with an error | “Not saved: {reason}” with the error of the status bar. A Word template also saves with warnings. |
PDF and XML templates
In the middle is the source text as Twig, with highlighting and line numbers. The header names the file name, e.g. export.html.twig, and “Twig · HTML for mPDF” or “Twig · XML”. The Tab key indents.
| Element | Content |
|---|---|
| Status bar left | “No errors” or “Line {line}: {message}”. The faulty line is marked red. |
| Status bar right | Line and column of the caret, plus “Twig 3 · UTF-8” |
| Selection Preview | Shows the result. Above the preview, PDF shows “{format} portrait · {pages} pages” and, with offers of the season, “{count} offers from {season}”. If the season has no offers, it shows “{count} sample offers”. |
| Preview PDF | The pages as the file has them, in an isolated frame |
| Preview XML | The message “Well-formed · <{root}> with {count} entries” and below it the text of the file. XML is only written once it is well-formed; otherwise the preview reports “The output is not valid XML: {message}”. |
| Preview with an error | “Preview not possible” with the message and the link Go to line {line} |
| Selection Variables | List of the variables that can be inserted. An entry inserts the text at the caret. For a template of the installation, the list is read-only. |
Variables
The PDF template receives the offers as items, the XML template as offers. In the table, list stands for this list.
| Variable | Content | Available in |
|---|---|---|
list | Offers of the selection, season or filtered list. The entry inserts a loop for offer in …. | PDF, XML |
offer.name | Title | PDF, XML |
offer.number | Offer number | PDF, XML |
offer.teaser | Short description | PDF, XML |
offer.description | Description as HTML | PDF, XML |
offer.dates | Dates with begin and end | PDF, XML |
offer.minAge, offer.maxAge | Age from, age to | PDF, XML |
offer.fee | Fee in euros | PDF, XML |
offer.meetingPoint | Meeting point | PDF, XML |
offer.hosts | Organizers with name | PDF, XML |
offer.categories | Categories with name | PDF, XML |
offer.properties | Own properties with Print in the booklet, with label and value (Settings) | PDF, XML |
edition.name | Season | PDF, XML |
today | Date of the export | PDF, XML |
images | Logos of the organizers with path and dimensions | XML |
<pagebreak /> | New page | |
{PAGENO} / {nbpg} | Page number in header or footer | |
<htmlpagefooter> | Footer on each page | |
var:tenantLogo | Logo of the tenant, e.g. as <img src="var:tenantLogo" height="18mm" /> | |
loop.index, loop.last | Counter in loops | PDF, XML |
date | Filter that formats a date, e.g. date('d.m.Y') | XML |
<![CDATA[ … ]]> | Text with special characters | XML |
Rules
| Rule | Content |
|---|---|
| Permitted Twig | The Twig of a template runs with a limited selection of tags, filters and functions. Methods cannot be called. A variable that does not exist is an error. |
| Images and links in the PDF | Addresses of images, links and stylesheets must begin with var:, data: or #. fepli removes every other address. Files of the server never get into the PDF. |
| Fonts in the PDF | font-family names the key of a font from the list (Fonts). |
| Offers in the PDF studio | The PDF studio finds the offers' pages if the PDF template writes the offers in a loop over items, one section per offer. The template needs nothing special for this. |
| Adjustments from the PDF studio | An adjustment belongs to the template and the offer. It holds in every PDF of the template until the offer or the template changes (Origin). |
| Message | Meaning |
|---|---|
| “There is no variable “{name}” here.” | The template uses an unknown variable. |
| “There is no field “{name}” here.” | The template accesses a field that the offer does not have. |
| “There is no filter “{name}”.”, “There is no function “{name}”.” | There is no filter or function of this name. |
| “The tag “{name}” is not allowed in export templates.”, “The filter “{name}” is not allowed in export templates.”, “The function “{name}” is not allowed in export templates.” | The element exists, but export templates may not use it. |
| “A block is not closed – is endfor or endif missing?” | A for or if has no end. |
| “The output is not valid XML: {message}” | The result of an XML template is not well-formed. |
Word templates
The middle shows the uploaded file. Without a file, it shows Choose DOCX file with “.docx up to 10 MB · please save older .doc files as .docx in Word”. Above it, it says: “Design the document in Word and upload it here. Placeholders like ${offer.name} are replaced with text on export; whatever is between ${offer} and ${/offer} repeats for each offer. Font, header and footer and logos stay as they are in Word.”
| Element | Content |
|---|---|
| File card | Name of the file, below it “{size} KB · uploaded {date} · {name}” |
| Download | Downloads the saved file. |
| Replace | Uploads another file and replaces the previous one. |
| Placeholders found | Every placeholder of the file with its meaning, the number of its occurrences and the badge known or unknown. Above it, it says “{count} different · all known” or “{count} different · {count} unknown”. |
| Right column Placeholders | List of all placeholders. An entry copies the placeholder to the clipboard and reports “{placeholder} copied”. |
| Placeholder | Content |
|---|---|
${offer} | Start of the block that repeats for each offer |
${/offer} | End of the block |
${offer.name} | Title |
${offer.number} | Offer number |
${offer.teaser} | Short description |
${offer.description} | Description as text |
${offer.date} | Dates, e.g. “14.07.2026, 09:30–15:00” |
${offer.age} | Age, e.g. “10–14 years” |
${offer.fee} | Fee, e.g. “€12.00” |
${offer.meetingPoint} | Meeting point |
${offer.hosts} | Organizers, separated by commas |
${offer.categories} | Categories, separated by commas |
${edition.name} | Season, e.g. “Summer holidays 2027” |
${today} | Date of the export |
| Rule | Content |
|---|---|
| Formatting | The placeholders are replaced with text; the formatting comes from the placeholder in Word. |
| Table row per offer | If the block is in one table row, the row is repeated for each offer. |
| Warning without block | “Without ${offer} … ${/offer} only the first offer is in the document.” |
| Warning without end | “${offer} without ${/offer} – the block does not end.” |
| Warning for an unknown placeholder | “fepli doesn’t know {names} – it stays unchanged in the text of the export. A typo? The list on the right shows all placeholders.” |
| Files | .docx only, up to 10 MB |
| Message | Meaning |
|---|---|
| “Only .docx files. Please save older .doc files as .docx in Word.” | The file has another format. |
| “The file is larger than 10 MB.” | The file is too large. |
The Word templates of the instance with the markers ${BLOCK_ANGEBOT} and ${name} are described under Export.
XLSX templates
The middle shows the table as the file will have it, worked out for the first offers of the season with an editing phase. If the season has no offers, it shows sample offers. Below the table are the settings of the selected column.
| Element | Content |
|---|---|
| Header of the table | Name of the sheet, then “{count} columns · {count} sample offers” or “{count} columns · {count} offers of the season”. If a column has an error, the message follows. |
| Column letter | Selects the column. Calculated columns carry fx. A red dot marks a column with an error. |
| Column | Menu with Offer field, Questionnaire answer, Calculation and Cost breakdown. Questionnaire answer is missing while there is no question whose answer can be taken over. Cost breakdown is missing while no questionnaire has a cost breakdown. |
| Empty table | “No columns yet. Add one with “+ Column”.” |
Column
| Field | Meaning | Values |
|---|---|---|
| Heading | Head of the column in the file. Formulas refer to it. | Text |
| Arrows Move left, Move right | Move the column | |
| Duplicate | Creates a copy next to the column | |
| Remove column | Removes the column | |
| Content | Type of the column | Offer field, Questionnaire answer, Calculation |
| Offer field | Value from the offer. Only for Offer field. | ID, Offer number, Title, Hosts, Date, Meeting point, Age from, Age to, min. participants, max. participants, Fee, Application via fepli, Consent required, Contact person, Contact person’s e-mail, Categories, Season |
| Question | Question of a questionnaire, grouped by questionnaire. Only for Questionnaire answer. If the question no longer exists, it says “(question no longer exists)”. | |
| Cost line | Line of a cost breakdown or Sum of all lines. Only for a question with a cost breakdown. | |
| Fixed costs, per participant | Part of the line: fixed costs or costs per participant. Only for a question with a cost breakdown. | |
| Sum of columns, Formula | Kind of calculation. Only for Calculation. | |
| Add up columns | Columns with numbers that form the sum. Without a number column it says “No columns with numbers yet.” | |
| Formula | Expression with columns in square brackets, e.g. [Fixed costs] + [Variable costs] * [max participants]. Allowed are numbers, +, −, *, /, brackets and the functions MIN, MAX and RUNDEN; several values are separated by a semicolon. An entry with the name of a column inserts the reference. | |
| Format | Display in Excel | Text, Number, Euro, Date and time, Yes/no as 1/0 |
| Result row | Row below the table with the result of the column | none, Sum, Average |
A column with an Offer field starts with the format that suits the field: Euro for Fee, Date and time for Date, Number for numbers, age details and participant numbers, Yes/no as 1/0 for Application via fepli and Consent required, otherwise Text.
Cost breakdown
The entry Cost breakdown in the menu Column (description there: “every line fixed and per participant, with sums”) creates two columns for every line of the cost breakdown, Fixed {line} and Var {line}, plus the columns Fixed costs and Variable costs with the sums.
Notes below the column
| Element | Content |
|---|---|
| In Excel | The formula that the column has in the file, below it the origin of the value: “Value of the offer: {field}.”, “Answer from “{questionnaire}” · {question}. Empty where the questionnaire is not filled in.” or “Saved as an Excel formula that keeps calculating in the file when somebody changes values.” With a result row, “Result row: {formula}” follows. |
| “Example: {values}” | The values of the first offers, “empty” without a value |
| References | “References go by heading, not by position: reordering breaks no formula, renaming updates the references.” |
| Message | Meaning |
|---|---|
| “No columns chosen.” | The table has no column. |
| “The formula is missing.” | The calculation has no formula. |
| “There is no column “{name}”.” | The formula names a heading that no column has. |
| “Two columns are called “{name}” – the reference is ambiguous.” | 2 columns have the same heading. |
| “Allowed are columns in [ ], numbers, + − * / ( ) and MIN, MAX, RUNDEN.” | The formula contains another character. |
| “The formula does not add up – is a bracket, a number or an operator missing?” | The formula is incomplete. |
| “Refers to itself in a circle.” | 2 calculations refer to each other. |
Fonts
Location: Settings > Exports > Fonts.
Above the list it says: “Fonts for PDF templates. The CSS name is what goes in the template: font-family: swiza; Only static TrueType files (.ttf) – mPDF cannot read variable fonts and OTF.”
| Element | Content |
|---|---|
| Font | Name, below it the key that font-family uses in the template. |
| Badge built in, uploaded | Origin of the font. Supplied are Geist, Geist Medium, DejaVu Sans, DejaVu Serif and DejaVu Sans Mono. |
| “in {count} templates”, “not used” | Number of templates that set the font as base font |
| Sample line | Example text in the font |
| Styles | 4 fields: Regular (R), Italic (I), Bold (B), Bold italic (BI). A field shows file name and size, or “missing”. |
| + File | Uploads the file for a missing style of an uploaded font. |
| Upload font files | Uploads one or more TrueType files. fepli assigns them to a font and a style by the file name. |
| Remove | Deletes the font after the question “Remove “{name}”?” with “The font’s files will be deleted.” Message afterwards: ““{name}” has been removed.” For a font in use it says “Remove it from the templates first”. |
| Rule | Content |
|---|---|
| Assignment | “File names are matched: Name-Regular.ttf, -Italic, -Bold or -SemiBold, -BoldItalic. mPDF sets every weight from 600 up with the bold style; Medium and Light become fonts of their own (name-medium).” |
| File type | Static TrueType files (.ttf) only |
| Removing | A font can only be removed when no template sets it as base font. Supplied fonts cannot be removed. |
| Message | Meaning |
|---|---|
| “{count} font files uploaded.”, “Font file uploaded.” | The upload worked. |
| “{name}: only static TrueType files (.ttf).” | The file is not a TrueType file. |
| “{name}: mPDF cannot read OpenType with CFF outlines (.otf) – please use the TrueType version.” | The file is an OTF font. |
| “{name}: a variable font – mPDF needs a static file per style.” | The file is a variable font. |
| “{name}: this font comes with fepli and needs no file.” | The file belongs to a supplied font. |
| “Templates still use “{name}” – choose another font there first.” | The font cannot be removed. |