You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a stat sheet, I want to have a nice layout, setting the values where I want them to be. handlebars only gives me {{#each properties}} to traverse through the array and put all values unseen in my html. I only can reject empty values or those marked as gmOnly.
Something like: here the attributes and over there all the token's abilities isn't possible.
What I would need is a further helper to compare a fixed value or string with a value from properties.
{{#eachproperties}}{{#if **(compare"STR"this.shortName)** }}
<p>{{name}}s strength is {{this.value}}</p>
{{else}}
<p>{{name}}s a weakling. He has no strength </p>
{{/if}}{{/each}}
The Solution you'd like
I'm not a programmer, even less a java programmer.
handlebars calls those hash-commands (like each or if) helpers. I can't say anything about quality or license inflictions but there is https://github.com/Knotx/ knotx-handlebars-extension.
The MatchHelper or StringEqualsHelper would really help.
If the order of the properties array is predictable the ElementHelper could be an alternative, maybe extended by a second parameter for the n-th value in the row. This could open some really dirty tricks like a value-Fiels for strength with basevalue, modifier, etc.
Alternatives that you've considered.
If this option isn't given, I will have to ignore the new stat sheet and use a frame5 instead.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Describe the Problem
When building a stat sheet, I want to have a nice layout, setting the values where I want them to be. handlebars only gives me {{#each properties}} to traverse through the array and put all values unseen in my html. I only can reject empty values or those marked as gmOnly.
Something like: here the attributes and over there all the token's abilities isn't possible.
What I would need is a further helper to compare a fixed value or string with a value from properties.
Example:
{{#each properties}}
{{#if (compare "STR" this.shortName) }}
The Solution you'd like
I'm not a programmer, even less a java programmer.
handlebars calls those hash-commands (like each or if) helpers. I can't say anything about quality or license inflictions but there is https://github.com/Knotx/
knotx-handlebars-extension.
The MatchHelper or StringEqualsHelper would really help.
If the order of the properties array is predictable the ElementHelper could be an alternative, maybe extended by a second parameter for the n-th value in the row. This could open some really dirty tricks like a value-Fiels for strength with basevalue, modifier, etc.
Alternatives that you've considered.
If this option isn't given, I will have to ignore the new stat sheet and use a frame5 instead.
Additional Context
No response
The text was updated successfully, but these errors were encountered: