Upvote

Documentation  •  Changelog

Documentation

Display voting arrows

Displaying an element's vote tally is very simple...

{{ craft.upvote.tally(elementId [, key = null]) }}

The "key" parameter is optional. Use it only if you need to rate multiple things about the same element.

EXAMPLE:

<table>
    {% for entry in craft.entries.section('musicCollection') %}
        <tr>
            <td>
                <div>{{ craft.upvote.upvote(entry.id) }}</div>
                <div>{{ craft.upvote.tally(entry.id) }}</div>
                <div>{{ craft.upvote.downvote(entry.id) }}</div>
            </td>
            <td>{{ entry.title }}</td>
        </tr>
    {% endfor %}
</table>