Location: PHPKode > projects > Open Power Template > tests/Opt/instruction/include_9.txt
In addition to import a value, a data format should be imported, too.

>>>>templates/test.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- Include a file -->
<opt:root>
Foo{$variable.bar}
<opt:include file="included.tpl" import="yes" />
</opt:root>

>>>>templates/included.tpl
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- Include a file -->
<opt:root>
Bar{$variable.bar}
</opt:root>

>>>>expected.txt
OUTPUT

>>>>result.txt
FooABarA
>>>>data.php
$obj = new stdClass;
$obj->bar = 'A';
$view->variable = $obj;
$view->setFormat('variable', 'Objective');
Return current item: Open Power Template