Jump to main content Jump to doc navigation

modX.setPlaceholder

Other versions: 3.x — Found a problem? Please edit this page or report an issue.

modX::setPlaceholder

Sets a Placeholder value, corresponding to the "+" syntax.

Syntax

API Doc: http://api.modx.com/revolution/2.2/db_core_model_modx_modx.class.html#%5CmodX::setPlaceholder()

void setPlaceholder (string $key, mixed $value)

Example

$modx->setPlaceholder('name','Barry');

This causes the placeholder [[+name]] to be available inside your templates or page content.

See Also