Location: PHPKode > projects > Open Power Template > tests/Opt/format/singlearray_2.txt
Single array format: the "item" namespace.

>>>>templates/test.tpl
{$variable.item}
{$global.variable.item}

>>>>data.php
$view->variable = array('item' => 'FOO');
Opt_View::assignGlobal('variable', array('item' => 'BAR'));

$view->setFormat('variable', 'SingleArray');
Opt_View::setFormatGlobal('variable', 'SingleArray');

>>>>expected.txt
OUTPUT

>>>>result.txt
FOO
BAR
Return current item: Open Power Template