Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/show_4.txt
Check the linking between two sections with opt:show. In this test
there should not be a relationship, because the section "sub" is not
nested within opt:section, but opt:show.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<opt:show name="sect">
<opt:section name="sub">
{$sub.item}
</opt:section>
Foo:
<opt:section>
{$sect.val1},{$sect.val2}
</opt:section>
Eof
</opt:show>
</opt:root>

>>>>expected.txt
OUTPUT

>>>>result.txt
A
B
C
Foo:
A,B
C,D
E,F
G,H
Eof

>>>>data.php
$view->sect = array(
	array('val1' => 'A', 'val2' => 'B'),
	array('val1' => 'C', 'val2' => 'D'),
	array('val1' => 'E', 'val2' => 'F'),
	array('val1' => 'G', 'val2' => 'H'),
);
$view->sub = array(
	array('item' => 'A'),
	array('item' => 'B'),
	array('item' => 'C'),
);
Return current item: Open Power Template