Greater Than and Less Than Helper
Hi there π
I'd like to include a certain text string if the step.count is greater than a specified count. This will be used when aggregating notifications so we list a preview of the first 5 and then include something expressing there are more items at the end.
I imagine something like
or even a specific helper
{{#gt step.total_count 5}}
could work.
It looks like this is not a supported case but I was curious if there was any plans to support this case. I saw a previous support post in 2022 where they implied a GitHub issue would be opened but no luck finding it.
Thank you!8 Replies
@Shaun, you just advanced to level 2!
Previous post for reference: https://discord.com/channels/895029566685462578/1041712898059288647
@Shaun
Thanks for sharing the request and linking the previous support post.
We have not yet added this helper.
I could not find an issue for the same
Can you please help us in creating a feature request on github for this?
!feature
Hi @Pawan Jain ! Unfortunately my corporate GitHub doesn't seem to allow me to create issues in external repos. Would you be able to make a feature request for me or I can look into another way to contribute?
Yeah sure Shaun π
I will create an issue and share in this thread
GitHub
π Feature: support of Comparison operators handler helpers Β· Issue ...
π Feature description Comparison operators β operators that compare values and return true or false. The operators include: >, <, >=, <=, ===, and !==. Example:- {{#gt step.total_count ...
Thank you! Also just throwing this reference I found around adding comparison operators in handlebars: https://nicholasgraffis.medium.com/using-conditional-logic-in-handlebars-dd0942cb3a79
Medium
Using conditional logic in handlebars
We have {{#if}} and {{#unless}}, but how can we expand on this for easier and more advanced logic inside our handlebars templates? π€