{open}

Writes a literal opening brace that the template engine does not read as the start of a tag.

Output control Single tags

Syntax

{open}

Description

{open} answers PAD's stand-in for the character {. The stand-in travels through the rest of the rendering as plain text and is turned back into the brace when the page is written out, so the brace can never start a tag - not even when the text around it is handed to another tag or a pipe.

Together with {close} it writes a single brace pair in running text, such as the name of a tag in documentation. For more than a few braces - a script, a style block, a code sample - the {ignore} pair is simpler, and in an HTML page the entity { works too.

Not to be confused with the open= option of a data tag, which writes a text once before the first occurrence.

Examples

A tag name in text

The braces are written; what stands between them is not run.

Templateexamples/open/1-tag-name.pad
{set $word = 'sequence'}
<p>Use {open}{$word}{close} ... {open}/{$word}{close} to repeat a block.</p>
Resultopen alone

Use {sequence} ... {/sequence} to repeat a block.

See also

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