Difference between revisions of "Ratings"

From Sega Retro

m
m
Line 65: Line 65:
 
|colspan="2" style="padding:2px; text-align:center; line-height:initial" | <small>{{#vardefine:totalText|Based on<br>'''{{#var: totalReviews}}''' review{{#ifexpr: {{#var: totalReviews}} > 1|s| }}}}{{#var:totalText}}</small>
 
|colspan="2" style="padding:2px; text-align:center; line-height:initial" | <small>{{#vardefine:totalText|Based on<br>'''{{#var: totalReviews}}''' review{{#ifexpr: {{#var: totalReviews}} > 1|s| }}}}{{#var:totalText}}</small>
 
|}
 
|}
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
+
{{#vardefine:thisIsARating|false}}<includeonly>{{#cargo_store:
<span style="display:none" itemprop="itemReviewed" itemscope itemtype="https://schema.org/VideoGame">
 
<span itemprop="name">{{PAGENAME}}</span>
 
</span>
 
<meta itemprop="ratingValue" content="{{#var: average}}">
 
<meta itemprop="ratingCount" content="{{#var: totalReviews}}">
 
<meta itemprop="bestRating" content="100">
 
<meta itemprop="worstRating" content="0">
 
</div>{{#vardefine:thisIsARating|false}}<includeonly>{{#cargo_store:
 
 
_table = ratings_table
 
_table = ratings_table
 
|name = {{#titleparts:{{PAGENAME}}}}
 
|name = {{#titleparts:{{PAGENAME}}}}

Revision as of 23:52, 24 December 2020

Sega Retro Average 
Publication Score Source
{{{{{icon}}}|L}} Division by zero.
Based on
0 review
Sega Retro Average 
Publication Version Score
{{|L}} N/A
Based on
0 reviews

Ratings

This template defines the table "ratings_table". View table.

Usage

This template is to be used on articles about video games and will display scores awarded to said games by video game magazines/websites.

Usage:

{{Ratings
| icon=
| publication=
}}

Substitute "publication" with a publication code to get the desired result.

for sources, add "_source", e.g.

| smf_source=[http://www.google.com]
| vgce_source={{num|32|page=10/11}}

All fields are optional.