jehugaleahsa / mustache-sharp

An extension of the mustache text template engine for .NET.
The Unlicense
306 stars 78 forks source link

Handlebars not doing the substitutions correctly #44

Open ricarcon opened 9 years ago

ricarcon commented 9 years ago

I have the following template:

{{#each Records}} {{/each}}
Bug ID: {{ID}}{{Title}}{{Component}}{{OS}}{{Project}}
Root Cause/Resolution: {{Resolution}}
" I have this data structure: {"Records": [{ "Title": "some title", "Component": "some component", "OS": "Some os", "Project": "Some project", "ID": "some id"}, ... more records follow }] } But it's not rendering the Title, Component, OS, Project or Resolution. Essentially all those fields are the bug ID. Somehow the substitutions are all being done inserting the ID in all of the placeholders. Is my syntax wrong or what is going on?
ricarcon commented 9 years ago

because of the HTML, it didn't render correctly above, but I have the #each around the tr and td tags to build that table above... fyi.

jehugaleahsa commented 9 years ago

Just going out on a limb. Debug your code and see what your data looks like right before calling my code.

smurfpandey commented 9 years ago

@ricarcon you can use markdown syntax highlighting in your comments