{close}

Writes a literal closing brace that the template engine does not read as the end of a tag.

Output control Single tags

Syntax

{close}

Description

{close} answers PAD's stand-in for the character }, which is turned back into the brace when the page is written out. In between it is text: no tag can end on it, and a pipe or another tag that receives it sees no syntax.

It is the partner of {open}. A lone closing brace in a template is an orphan for the strict check; {close} writes it on purpose. For whole blocks with braces, use {ignore}.

Not to be confused with the close= option of a data tag, which writes a text once after the last occurrence.

Examples

An object literal from fields

A JSON-like text built around field values, its braces written by open and close.

Templateexamples/close/1-object.pad
{set $city = 'Utrecht'}
{set $degrees = 12}
<pre>{open} "city": "{$city}", "degrees": {$degrees} {close}</pre>
Resultopen alone
{ "city": "Utrecht", "degrees": 12 }

See also

  • {open} Writes a literal opening brace that the template engine does not read as the start of a tag.
  • {ignore} Keeps PAD from reading the braces in its content as tags - for inline JavaScript, CSS, JSON and code samples.