JsRender: Custom tags for rendering

TitleOrginal orderReverse order

HTML:

<td>
    {{sort languages reverse="true"}}
        <div>{{>name}}</div>
    {{/sort}}
</td>

Script:

$.views.tags({

    sort: function( array ){
        ...
        if ( this.tagCtx.props.reverse ) {
            // Render in reverse order
            for ( var l = array.length, i = l; i; i-- ) {
                ret += $.render( array[ i - 1 ], this.tmpl );
            }
        }
        ...
        return ret;
    }

});