The {{#users}}
wraps the whole list so the contents is repeated for each element.
You'd have to have to iterate twice over the list in order to split it like this.
{{#users}}
{{#isOk}}
<p>{{name}}</p>
{{/isOk}}
{{/users}}
{{#users}}
{{^isOk}}
<p>{{name}}</p>
{{/isOk}}
{{/users}}
Of course you could separate the list before you run over it twice:
// in js, divide in good & bad, join afterwards
var goodUsers = [],
badUsers = [],
sortedUsers = [];
users.forEach(function(user) {
if (user.isOk) {
goodUsers.push(user);
} else {
badUsers.push(user);
}
});
sortedUsers = goodUsers.concat(badUsers);
This way you'd only have to use your code once, but operate on the sorted list:
{{#sortedUsers}}
<p>{{name}}</p>
{{/sortedUsers}}