Article voting
The {{vote}}
helper can also act as a block helper, allowing you to define the content of each vote button.
You can also allow visitors to only vote whether an article, post or comment was useful, adopting a “like” or “thumbs up” visual style.
Post voting
Comment voting
The following patterns are intended for use with comments on both Article and Post pages.
Use .media
to present vertical vote buttons beside the comment body.
Using voting patterns
Voting button build upon the {{vote}}
helpers available on the Article page and Community Post page. You can use them to allow users to vote on articles and post, or comments added to either.
Article voting
Article voting patterns can be used anywhere on the Article page (article_page.hbs
) that has access to the article
object. Simply copy and paste the code of your selected pattern into the position you’d like it to appear on the page.
Post voting
Post voting button patterns can be used anywhere on the Community Post page (community_post_page.hbs
) that has access to the post
object. Simply copy and paste the code of your selected pattern into the position you’d like it to appear on the page.
Unlike on the Article page, there is no translated text available for a heading or a {{request_callout}}
helper, but you can add your own custom translated text using dynamic content when localizing your theme.
Comment voting
Comment voting patterns are designed to be used within a comment loop on the Article and Community Post pages.
{{#each comments}}
// Add your selected pattern code within this loop
{{/each}}