Unexpected HTML close tag

<tr>
            {{#each cell in board.cells}}
                <td></td>
                {{#if isDivisibleBy8 @index}}
                    </tr><tr>
                {{/if}}
            {{/each}}
        </tr>

Unexpected HTML close tag

Seriously? Any ideas to make a 8x8 table with a flat array of 64 cells?

You’ve closed your <tr> tag before actually opening it, which is the reason for your error.

The idea is to close the opening tag at first line when the index of the loop is divisible by 8.
Then create another opening tr tag that closes by the closing tag at the last line.

It works for PHP template engine I have been used, trying something similiar with Blaze/Spacebards :confused:

I don’t think that’s possible with Blaze. At least not this way. Can you explain more clearly what you’re trying to achieve ? Because for an 8x8 table, i would just break my board.cells in eight array before hand.

The idea is to render a flat 64 length array as a 8x8 html <table>.
It suppose to be easy :laughing:

I’ll make a helper to chunk the array into 8 arrays of 8 elements.

Thanks anyway.