Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/selector_6.txt
The test checks the opt:selector instruction.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<opt:selector name="sect">
<opt:foo>FOO: {$sect.val1},{$sect.val2}</opt:foo>
<opt:bar>BAR: {$sect.val1},{$sect.val2}</opt:bar>
<opt:selectorelse>NO DATA</opt:selectorelse>
</opt:selector>
</opt:root>

>>>>expected.txt
OUTPUT

>>>>result.txt
NO DATA

>>>>data.php
Return current item: Open Power Template