Syntax – Best Practices

Inhalte Switch to EN
Profile management Talent search Requests Tutorial
My tasks User management Template management Ontology management User Manual (DE)

Root-Strings

Utilize placeholders such as {firstName}, {lastName}, and {company} for dynamic content insertion.
Apply conditional tags to manage content visibility:
Example: {#job}job: {job}{/} displays content only if job is set.
Default text can be provided using inverted sections: {^job} Searching for a job {/}.

Images

Always use square images for profile photos to maintain visual alignment.
Match container dimensions to the image size and use fixed sizes such as 100:100 or 150:150 for consistency.
Avoid non-square definitions (e.g., 200:150) to prevent layout issues.

Date Formatting

Format dates using appropriate tags:
Example: {start | date:“YYYY.MM.dd“} for precise control.
Define fallback values when data is unavailable: {end | date:“YYYY“:“-No date set-„}.

Custom Fields

Display custom fields only when values are provided:
Example: {#customFields.date}Year of birth: {customFields.date | date:“YYYY“}{/}.

Root Arrays (e.g., Projects, Job Experience)

Repeat array items dynamically using {#projects} or {#jobExperience} blocks.
Format and conditionally display attributes:
Example: {start | date:“MMMM YYYY“} – {end | date:“MMMM YYYY“:’ongoing‘}.
Use inverted sections {^end} to indicate ongoing projects.

Certificates and Skills

List certificates only when available: {#certificates.length > 0}.
Categorize and sort skills dynamically:
Filter by rating: {#skills}{#rating>2}{name}{rateB}{/}{/skills}.
Avoid mixing skill categories (cSkills and tSkills) unless explicitly required.

Languages

Display languages with ratings greater than 3 as „Native“:
{#languages}{name}{#rating>3} (Native){/}{/languages}.

Education

Highlight the highest education separately and list others:
Example: {#schools}{^isHighest}• {name}, {graduation}, {start | date:“YYYY“}-{end | date:“YYYY“:’not finished‘}{/}{/schools}.

General Recommendations

Container Alignment: Ensure containers fit their content to prevent clipping or overflow.
Avoid Hidden Characters: Delete or rewrite invisible quotes introduced by text processors (e.g., Word, PowerPoint).
Fallback Defaults: Always provide fallback values to handle missing or incomplete data gracefully.
Consistent Formatting: Use predefined templates and examples to maintain uniformity across outputs.

Zusätzliche Ressourcen

Tag Types Documentation
Conditions on Attributes
Filters on Lists

By following these guidelines, you can create robust, flexible templates that accommodate diverse use cases while minimizing errors.

Syntax-Error Support

To help you out, here are the most common errors in the templates that trigger error messages in the app.

Error message in application Meaning Solution Typical causes
The tag beginning with … Placeholder not opened correctly Check placeholder, correct if necessary
  •  A placeholder such as {#field_name} was not written correctly (e.g., $ {#field name} with spaces).
  • A tag was opened but never closed—or vice versa.

 

The loop with tag „“ is unopened Loop not opened correctly Check loop structure
  •  A loop was opened incorrectly with {skills}, the # is missing {#skills}.
  • Or the loop was not opened with the correct name {#skil}. -> This may result in subsequent errors

 

The loop with tag “ “ is unclosed Loop not closed correctly Check loop structure
  • A loop was opened with {#skills} but not closed with {/}.

 

error in the template

Supported file formats: .docx,.pptx

Incorrect file format used Check uploaded file to see if it is docx or pptx.
error in the template

The scope parser for the tag „name==”xxxxx”“ failed to compile

Incorrect characters used Characters should be a single quotation mark ‘xxxx’ in conditions. Not “xxxx”.

AI assistants are also a helpful support. For example: using the following wording: “The following syntax was used in a Word file with DocXTemplater running in the background. Please assist with error message.”