Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/tree_6.txt
The test checks if the tree works correctly with the other initial depth.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
<opt:tree name="tree">
<opt:list>
LIST START:
<opt:content />
LIST END:
</opt:list>
<opt:node>
NODE {$tree.title} START:
<opt:content />
NODE {$tree.title} END
</opt:node>
</opt:tree>
</opt:root>

>>>>expected.txt
OUTPUT

>>>>result.txt
LIST START:
NODE 1 START:
LIST START:
NODE 1.1 START:
LIST START:
NODE 1.1.1 START:
NODE 1.1.1 END
LIST END:
NODE 1.1 END
LIST END:
NODE 1 END
LIST END:

>>>>data.php
$view->tree = array(0 =>
	array('title' => '1', 'depth' => 6),
	array('title' => '1.1', 'depth' => 7),
	array('title' => '1.1.1', 'depth' => 8),
);
Return current item: Open Power Template