Difference between revisions of "Template:MyRatings"
Jump to navigation
Jump to search
(desc) |
(Add sort params) |
||
Line 3: | Line 3: | ||
It currently has one optional parameter, the sort key:<br/> | It currently has one optional parameter, the sort key:<br/> | ||
<nowiki>{{</nowiki>{{PAGENAME}}<br/> | <nowiki>{{</nowiki>{{PAGENAME}}<br/> | ||
− | |sort=Has | + | |sort=Has publicationDate (defaults to 'Has value')<br/> |
|order=random (defaults to 'descending')<br/> | |order=random (defaults to 'descending')<br/> | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
Line 19: | Line 19: | ||
|?Description2 | |?Description2 | ||
|format=template | |format=template | ||
− | |order={{{order|descending}}} | + | |order={{#if: {{{order|}}}|{{{order|}}}|descending}}} |
− | |sort={{{sort|Has value}}} | + | |sort={{#if: {{{sort|}}}|{{{sort|}}}|Has value}}} |
|template=MyRatings/Output | |template=MyRatings/Output | ||
}}</div></includeonly> | }}</div></includeonly> |
Revision as of 14:00, 27 August 2016
This is intended for use on pages in the user: namespace. It makes a list of all that users' ratings.
If the user has no ratings, it draws a thin stripey black line. It calls Template:MyRatings/Output to format output.
It currently has one optional parameter, the sort key:
{{MyRatings
|sort=Has publicationDate (defaults to 'Has value')
|order=random (defaults to 'descending')
}}
}}
Targets of ratings (i.e. SMWObjects) should use Template:DisplayRatings.
Example:
==Ratings==
{{MyRatings|sort=Has publicationDate}}