{foo}

A built-in demo tag that answers a fixed line, there to show how the type prefixes resolve a name.

Output control Single tags

Syntax

{foo}
{pad:foo}

Description

{foo} has no use of its own: it answers the line Foo tag from pad. It exists so that the manual can show what a name resolves to when several kinds of thing carry it - an application tag in _tags/foo.php, a pipe function, a PHP function, a data or bool store, a content block.

A bare {foo} is looked up in a fixed order, and an application tag comes before the built-in one: a _tags/foo.php in the page's directory or one of its parents wins. A type prefix names the kind outright - {pad:foo} is always the built-in tag, {app:foo} always the application's, and php:, function:, data:, bool: and the other prefixes each name their own kind.

The second example below has a _tags/foo.php in its own directory, so the bare name and the app: prefix find that one, while pad:foo still reaches the built-in.

Examples

The demo tag

The built-in foo answers a fixed line - there to show which tag a name resolves to.

Templateexamples/foo/1-builtin.pad
<p>{pad:foo}</p>
Resultopen alone

Foo tag from pad

Which foo?

This directory has a _tags/foo.php of its own: the bare name finds it first, pad: names the built-in.

Templateexamples/foo/2-prefixes.pad
<p>foo: {foo}</p>
<p>app:foo: {app:foo}</p>
<p>pad:foo: {pad:foo}</p>
Resultopen alone

foo: Foo tag from this directory's _tags

app:foo: Foo tag from this directory's _tags

pad:foo: Foo tag from pad

See also

  • {pad} A tag with no behaviour of its own: its content renders once, or per row with data=, carrying the generic options.
  • {echo} Evaluates an expression and prints the result - the general output tag, and the one to put in front of a pipe.