Recode from PHP to Handlebars