Check, whether opt:show works with snippets.
>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<opt:snippet name="foo">
Foo:
<opt:section>
{$foo.val1},{$foo.val2}
</opt:section>
Eof
</opt:snippet>
<opt:show name="sect" opt:use="foo" />
</opt:root>
>>>>expected.txt
OUTPUT
>>>>result.txt
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'),
);