Selectors::setCustomVariableValue()

Set a custom [variable] value available to all Selectors and PageFinder class instances

Available since version 3.0.255.

Example

Selectors::setCustomVariableValue('foo', 'bar'); 
$s = new Selectors("name=[foo]");
echo $s; // outputs: "name=bar"
$pages->find("name=[foo]"); // finds pages with name=bar

Usage

Selectors::setCustomVariableValue(string $name, $value);

Arguments

NameType(s)Description
$namestring
$valuestring int array WireData float null bool

Selectors methods and properties

API reference based on ProcessWire core version 3.0.255