Handlebars.Net
Handlebars.Net copied to clipboard
Replace built-in helpers
How to replace built-in block helpers ex. #if. Tried the following:
var config = new HandlebarsConfiguration()
{
};
config.BlockHelpers.AddOrReplace("if", new IfHelper());
_handlebars = Handlebars.Create(config);
_handlebars.Configuration.BlockHelpers.AddOrReplace("if", new IfHelper());
does not work as it seems the default handler factory is loaded later and not respecting this.
@cloudfy Did you try to register your helper as described here: https://github.com/Handlebars-Net/Handlebars.Net?tab=readme-ov-file#registering-block-helpers