93-interactive
unread,Feb 23, 2011, 12:35:39 PM2/23/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2o template PHP
Hi,
for my current problematic (see discussion here) there would be a easy
solution:
a new config variable, maybe 'leaveEmpty' or similar which defaults to
false and when set to true, after rendering the template, all variable
place holders like are still there.
E.g.: Template index.html:
Hello {{ user }} your password is {{ password }}
Default:
$h2o = new h2o('index.html');
$vars = array('user' => 'John Doe');
echo $h2o->render($vars);
gets:
Hello John Doe your password is
Optional behaviour:
$h2o = new h2o('index.html', array('leaveEmpty'=>true);
$vars = array('user' => 'John Doe');
echo $h2o->render($vars);
gets:
Hello John Doe your password is {{ password }}