Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/extend_3.txt
Check more compound inheritance chains with importing parent contents.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:extend file="extended1.tpl">
<opt:snippet name="foo">
FOO-VALUE1
<opt:parent/>
</opt:snippet>
</opt:extend>

>>>>templates/extended1.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:extend file="extended2.tpl">
<opt:snippet name="foo">
FOO-VALUE2
</opt:snippet>
<opt:snippet name="goo">
GOO-VALUE2
</opt:snippet>
</opt:extend>

>>>>templates/extended2.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<opt:root>
BEGIN
<opt:insert snippet="foo" />
<opt:insert snippet="goo" />
END
</opt:root>

>>>>expected.txt
OUTPUT

>>>>result.txt
BEGIN
FOO-VALUE1
FOO-VALUE2
GOO-VALUE2
END
Return current item: Open Power Template