Difference between revisions of "Template:RatingAsStars"

From Wikispooks
Jump to navigation Jump to search
(Created page with "<noinclude>category:Rating Templates'''This presents the average rating of a page.'''<br/> It has two parameters:<br/> {{t|pagename}}, the name of the page in question<br/...")
 
(title and link)
Line 2: Line 2:
 
It has two parameters:<br/>
 
It has two parameters:<br/>
 
{{t|pagename}}, the name of the page in question<br/>
 
{{t|pagename}}, the name of the page in question<br/>
{{t|size}}, the width of the star icon (defaults to 80px)</noinclude><includeonly>{{#if: {{#show: {{{pagename|}}} | ?Has averageRating }}|[[image:{{#show: {{{pagename|}}} | ?Has averageRating }}star.png|{{#if: {{{size|}}}|{{{size}}}|80px}}]]}}</includeonly>
+
{{t|size}}, the width of the star icon (defaults to 80px)</noinclude><includeonly>{{#if: {{#show: {{{pagename|}}} | ?Has averageRating }}|[[image:{{#show: {{{pagename|}}} | ?Has averageRating }}star.png|link=pagename|Rated {{#show: {{{pagename|}}} | ?Has averageRating }}/5|{{#if: {{{size|}}}|{{{size}}}|80px}}]]}}</includeonly>

Revision as of 03:47, 20 September 2016

This presents the average rating of a page.
It has two parameters:
pagename, the name of the page in question
size, the width of the star icon (defaults to 80px)