I’m trying to build a comment reply system.
This is what I got so far:
in several templates, where I just take the comments out of a database with a helper:
{{#each textComments}} {{> comment}} {{/each}}
the comment template: {{author}}: {{text}} <a href="">reply</a> {{#if replyField}} <input name="reply" id="newComment" type="text" > {{/if}}
now I want to show the input field when the anchor tag is clicked
BUT only for the one template where the anchor tag was clicked
so a helper like
replyField: function() { var x = clickValue.get() if (x) { return true; } else { return false; } }
(where ‘clickValue’ is set inside an event helper) does not work because it is set for all templates eg. all comments show the inputfield.
Any suggestions on a different approach to get this working?