Handlebars-Net / Handlebars.Net

A real .NET Handlebars engine
MIT License
1.24k stars 214 forks source link

[Question] context param can be modified? #511

Closed JuanOrjuelaA closed 2 years ago

JuanOrjuelaA commented 2 years ago

Hello guys

Is there a way to modify the info from the context param? I have a list in the context, and I want to remove some items from that list to be displayed in my template.

oformaniuk commented 2 years ago

Hello @JuanOrjuelaA You can access context value inside the helper using context.Value. You'd still need to cast it to a correct type though.

JuanOrjuelaA commented 2 years ago

Awesome, thanks!