enddefine

Completes a macro definition.

Syntax

enddefine

Input

N/A

Example

Example 1
Template:
{define greeting(first, last)}
Dear {first} {last},
{enddefine}
{greeting("John", "Doe")}
Output:
Dear John Doe,
Example 2
Template:
{define header()}
Chapter 5 - Templex Functions
{enddefine}
{header()}
Output:
Chapter 5 - Templex Functions
Example 3
Template:
{define footer()}
Templex Programmer's Guide
{enddefine}
{footer()}
Output:
Templex Programmer's Guide

Comments

Macros are reusable segments of a template. They are useful in cases where the same series of template statements or text can be used repeatedly.

Macro definitions begin with a define statement and end with an enddefine statement. The define statement declares the name of the macro and any arguments it might have.