Actions

Template

Difference between revisions of "RatingsRowSum"

From NEC Retro

(Created page with "<includeonly>{{#vardefine:thisIsARating|true}} {{ #if: {{{2|}}} | {{!}}<span itemprop="author">{{{1}}}</span>{{addvar|cumulativeScore|{{{2}}}}}{{incvar|totalReviews}} {{!}}sty...")
 
 
Line 1: Line 1:
<includeonly>{{#vardefine:thisIsARating|true}}
+
<includeonly><!-- scoreoverride exists for a test of Template:StarRating - it is not essential -->
{{ #if: {{{2|}}} | {{!}}<span itemprop="author">{{{1}}}</span>{{addvar|cumulativeScore|{{{2}}}}}{{incvar|totalReviews}}
+
{{ #if: {{{2|}}} | {{!}}<span itemprop="author">{{{1}}}</span>{{addvar|cumulativeScore|{{#if:{{#var:scoreoverride}}|{{#var:scoreoverride}}|{{{2}}}}}}}{{incvar|totalReviews}}{{#vardefine:scoreoverride|}}
{{!}}style="padding-left:5px; text-align:center; {{scoreColour|{{{2}}}}}" width="20px" {{!}}<span itemprop="ratingValue">{{{2}}}</span>
+
{{!}} style="text-align:center; {{scoreColour|{{{2}}}}}" {{!}}<span itemprop="ratingValue">{{#expr:{{{2}}} round 0}}</span>
 
{{!}} {{#if: {{{3|}}} | {{{3}}} | [[Category:Rating without source]] }}
 
{{!}} {{#if: {{{3|}}} | {{{3}}} | [[Category:Rating without source]] }}
 
{{!}}-
 
{{!}}-

Latest revision as of 16:27, 31 December 2021

See Template:Ratings for usage.