<?php

require_once '../../../../Wact/Loader.inc.php';
Wact_Loader::setupWact();

$reader = new Wact_Template_Reader_File(realpath('.'), 'templates');

// Don't bother to save compiled templates
$cache = new Wact_Cache_Store_Transient();

$loader = new Wact_Template_Loader($reader, $cache);
$tmpl = $loader->load('/wrap_more/wrap.tpl.html');

$tmpl->setModel(array('title'=>'More on Wrapping'));

$tmpl->getChild('wrap1')->getChild('box')->setAttribute('bordercolor', 'red');
$tmpl->getChild('wrap2')->getChild('box')->setAttribute('bordercolor', 'blue');
$wrapOuter = $tmpl->getChild('outer');
$wrapOuter->getChild('box')->setAttribute('border', 20);
$wrapInner = $wrapOuter->getChild('inner');
$wrapInner->getChild('box')->setAttribute('border', 3);

$tmpl->display();

?>