Difference between revisions of "Template:DisplayRatings"

From Wikispooks
Jump to navigation Jump to search
(Fix the == subsection issue)
Line 1: Line 1:
 
<noinclude>[[Category:Document Templates]]'''This is intended for use on pages in the {{NS|document}} (or later, the main namespace). It makes a list of ratings of that page.'''<br/>
 
<noinclude>[[Category:Document Templates]]'''This is intended for use on pages in the {{NS|document}} (or later, the main namespace). It makes a list of ratings of that page.'''<br/>
 
It currently has no parameters, but this may change.<br/>
 
It currently has no parameters, but this may change.<br/>
''If you wish to display a list of ratings on your userpage, you should use [[Template:Ratings]].''</noinclude><includeonly>{{#switch: {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}
+
''If you wish to display a list of ratings on your userpage, you should use [[Template:Ratings]].''</noinclude><includeonly>{{#ifexpr: {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}} >0|
| 0 =
+
== {{spz|{{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}|Rating|Ratings|ERROR}} ==
| 1 =
+
 
| 2 <!-- 2 or more, display average rating -->
 
| #default = '''Average Rating''': [[image:{{#show: {{FULLPAGENAME}} | ?Has averageRating }}star.png|100px|link=Template:Rate|alt={{#show: {{FULLPAGENAME}} | ?Has averageRating }}]] {{#show: {{FULLPAGENAME}} | ?Has averageRating }} from {{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}} reviews}}
 
 
{{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]
 
{{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]
 
|?-Has subobject
 
|?-Has subobject
Line 15: Line 13:
 
|sort=Has publicationDate
 
|sort=Has publicationDate
 
|template=DisplayRatings/Output
 
|template=DisplayRatings/Output
|userparam={{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}
+
|userparam={{#ask: [[Constitutes::Rating]][[Has target::{{FULLPAGENAME}}]]|format=count}}}}}}</includeonly>
}}</includeonly>
 

Revision as of 07:40, 1 July 2016

This is intended for use on pages in the document: namespace (or later, the main namespace). It makes a list of ratings of that page.
It currently has no parameters, but this may change.
If you wish to display a list of ratings on your userpage, you should use Template:Ratings.