Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/extend_9.txt
Check the dynamic inheritance.

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

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

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

>>>>expected.txt
OUTPUT

>>>>result.txt
BEGIN-DYNAMIC
SNIPPET-VALUE
END-DYNAMIC

>>>>data.php
$view->inherit('dynamic1.tpl');
Return current item: Open Power Template