Is it possible to register HandleBars helpers in a smartdocs template?
I am trying to do something like this
Handlebars.registerHelper('equal', function(lvalue, rvalue, options) { if (arguments.length < 3) throw new Error("Handlebars Helper equal needs 2 parameters"); if( lvalue!=rvalue ) { return options.inverse(this); } else { return options.fn(this); } });
Solved! Go to Solution.
As far as I know, you cannot register Handlebars helpers in SmartDocs templates. You may be able to include some JavaScript to be executed by the client if you're looking to apply logic to inputs.
As far as I know, you cannot register Handlebars helpers in SmartDocs templates. You may be able to include some JavaScript to be executed by the client if you're looking to apply logic to inputs.
To clarify: while it is not possible to register a helper from within the template itself, it is absolutely possible for people to register Handlebars helpers from within a additional Javascript module that augments the builtin smartdocs JS.
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |