How to use multiple parameters in a handlebar helper with meteor?

Your logic is good, just make some changes to the template

<template name="myTemplate">
  {{testHelper "value1" "value2"}}
</template>

Bare in mind that the testHelper function is only defined in the myTemplate template.

If you want to register testHelper globally you’ll need to do something like this

Handlebars.registerHelper('testHelper', function(foo, bar){
  console.log(foo);
  console.log(bar);
});

Have fun

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)