Hello pea,
The problem is you are using h2o render method to pass and set the
current context, so in your code the template gets rendered twice.
Which is incorrect usage of the system. $h2o->render() should be
called once and you can pass in the entire context object in one go
with php compact function.
For example:
$name = 'taylor';
$age = 19;
$school = 'The collage';
$h2o->render(compact('name', 'age', 'school'));
I have edited your main script and you can see in this code paste
http://gist.github.com/163882