Complete Example
Model
The model defines a simple concept with a singlename property:
namespace [email protected]- Defines the namespace and version@template- Decorator marking this as a template concepto String name- A required string property calledname
Template
The template uses markdown with a variable placeholder:{{name}}- Variable placeholder that gets replaced with the actual name- Uses standard markdown syntax (blockquote
>and heading###) - Clean and simple formatting
Data
The data object provides the value for the template:$class- Fully-qualified type name matching the modelname- The value that will replace{{name}}in the template
Generated Output
When rendered, this template produces:The one, the only…
Hello John Doe!
Usage
Here’s how to use this sample in your code:Try It Yourself
Experiment with different values:Different Names
Different Names
Multiple Words
Multiple Words
Extending the Sample
You can extend this basic sample by:- Adding more properties:
- Using the properties in the template:
- Providing the data:
Related Samples
Formula Sample
Add dynamic calculations to your templates
Employment Offer
See a more complex real-world example
Next Steps
- Learn about date and number formatting
- Explore conditional logic
- Understand clauses