Many thanks to our Patrons who cover ~2/3 of our hosting bill. Please join them if you can.
Difference between revisions of "Template:DisplayAverageRating"
Jump to navigation
Jump to search
(fix for 1 rating) |
|||
Line 1: | Line 1: | ||
<noinclude>[[Category:Document Templates]][[category:Rating Templates]]'''This is intended for use on pages at the top of an infobox. It displays the average rating of that page, and links to the ratings section.'''<br/></noinclude><includeonly> | <noinclude>[[Category:Document Templates]][[category:Rating Templates]]'''This is intended for use on pages at the top of an infobox. It displays the average rating of that page, and links to the ratings section.'''<br/></noinclude><includeonly> | ||
{{#switch: {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}} | {{#switch: {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}} | ||
− | | 0 | + | | 0 =<!-- 1 or more, display average rating --> |
− | |||
| #default = '''Average Rating''': [[image:{{#show: {{FULLPAGENAME}} | ?Has averageRating }}star.png|100px|link=#Ratings|alt={{#show: {{FULLPAGENAME}} | ?Has averageRating }}]] {{#show: {{FULLPAGENAME}} | ?Has averageRating }} from {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}} reviews}}</includeonly> | | #default = '''Average Rating''': [[image:{{#show: {{FULLPAGENAME}} | ?Has averageRating }}star.png|100px|link=#Ratings|alt={{#show: {{FULLPAGENAME}} | ?Has averageRating }}]] {{#show: {{FULLPAGENAME}} | ?Has averageRating }} from {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}} reviews}}</includeonly> |
Revision as of 08:53, 26 October 2016
This is intended for use on pages at the top of an infobox. It displays the average rating of that page, and links to the ratings section.