2

This seems to be a simple matter and maybe it's solved already, but I'm not sure how to do it. I'd like to keep arbitrary unresolved expressions for later evaluation. Note that I still don't know which expressions are already defined.

For example, suppose I have the expression...

{{source.path}}/mainmenu{{ext}}"

...and the context defines ext as .js, but source.path is still undefined. What I get is/mainmenu.js", but I'd like to get {{source.path}}/mainmenu.js" instead so that I can evaluate {{source.path}} at a later time. HandlebarsConfiguration.UnresolvedBindingFormatter seemed promising, but it doesn't handle the complete original expression. HandlebarsConfiguration.ExpressionNameResolver also didn't help.

So, is it possible to do this at all? Thanks in advance for any help.

Rubem Pechansky
  • 185
  • 2
  • 7
  • Hi there, handlebars.net author here. At the time of this writing, that's not possible. Suggest you open an issue on Github or, even better, submit a pull request to add it! – Rex M Jul 27 '19 at 01:36
  • I've requested the implementation of the "missing" hooks [here](https://github.com/rexm/Handlebars.Net/issues/350). In Handlebarsjs we successfully used the "missingHelper" to implement what you need. – sferencik May 28 '20 at 10:38
  • Thanks, @sferencik. I've moved to Nunjucks for some time now because I realized I neeed more powerful templates. Good to know that Handlebars is evolving. – Rubem Pechansky May 28 '20 at 14:12

0 Answers0