Anyone experienced with handlebars and #each?
# suitescript
r
Anyone experienced with handlebars and #each?
m
Sure. What is your question specifically?
r
I have a statement with each and it's working but need to add some code to have a <br> or </n> after each passing
Is there a way to add into the {{#each}} or {{/each}} to add a </br> and have it work?
m
Can’t you just add the <br/> before the {{/each}}?
r
That works but I'm sending an SMS and it shows up in the message
Ive seen these but something similar if possible https://zordius.github.io/HandlebarsCookbook/0019-each.html
m
Hmm. From that page it looks like you just add a \n after your content
Copy code
'{{#each foo}}\n{{@key}}:{{.}}!\n{{/each}}'
r
This works too but still shows up the in sms since it isn't using html. Know of any way to "include" in the {{each}} tags by chance?
Hope this makes sense
figured it out. Thanks @Mark
m
Oh great! What ended up solving it?
Did you need a sms specific newline symbol?
r
...... Just needed to hit "return" and added a new line.........
Tried to over code it.........
😶
m
haha good find!
r
Thanks for being so responsive and helping ha
m
no problem!