Difference between revisions of "Template:List experts"

From SNIC Documentation
Jump to: navigation, search
Line 4: Line 4:
 
This template will generate a list of experts on the matter described on ''page'' (defaults to <nowiki>{{PAGENAME}}</nowiki>). If there are any people who are tagged with the [[Property:Expertise]] ''page'', then only these people will be displayed. Otherwise, people in one of its [[Property:Field]]s will be shown. It also works for category pages. ''default'' can be used to change the message that is displayed if no experts are found.
 
This template will generate a list of experts on the matter described on ''page'' (defaults to <nowiki>{{PAGENAME}}</nowiki>). If there are any people who are tagged with the [[Property:Expertise]] ''page'', then only these people will be displayed. Otherwise, people in one of its [[Property:Field]]s will be shown. It also works for category pages. ''default'' can be used to change the message that is displayed if no experts are found.
  
The exact presentation format may be subject to change in the future. Especially, the desired behaviour of this template is that it should always produce two lists, one with only people with specific expertise, and one with only the relevant field experts ''without'' repeating the specific experts. However, due to limitations in the semantic mediawiki query language, it is currently not possible to generate the latter list (cannot query for absence of a specific value in multiply set properties). There is a chance that these restrictions may disappear in an upcoming version of semantic mediawiki where inline sparql queries will be supported.   
+
The exact presentation format may be subject to change in the future. Specifically, the desired behaviour of this template is that it should always produce two lists, one with only people with specific expertise, and one with only the relevant field experts ''without'' repeating the specific experts. However, due to limitations in the semantic mediawiki query language, it is currently not possible to generate the latter list (cannot query for absence of a specific value in multiply set properties). There is a chance that these restrictions may disappear in an upcoming version of semantic mediawiki where inline sparql queries will be supported.   
  
 
Examples:  
 
Examples:  
Line 11: Line 11:
 
  {{</nowiki>list experts|page=HMMER<nowiki>}}</nowiki>
 
  {{</nowiki>list experts|page=HMMER<nowiki>}}</nowiki>
  
</noinclude><includeonly><onlyinclude>{{#if: {{#ask: [[expertise::{{{page|{{PAGENAME}}}}}]]|limit=1}}|{{list specific experts|page={{{page|{{PAGENAME}}}}}}}|No experts have currently registered expertise on this specific subject. {{list general experts|page={{{page|{{PAGENAME}}}}}}}}}</onlyinclude></includeonly>
+
</noinclude><includeonly><onlyinclude>{{#if: {{#ask: [[expertise::{{{page|{{PAGENAME}}}}}]]|limit=1}}|{{list specific experts|page={{{page|{{PAGENAME}}}}}}}|No experts have currently registered expertise on this specific subject. {{list general experts|page={{{page|{{PAGENAME}}}}}|intro=List of registered field experts:}}}}</onlyinclude></includeonly>

Revision as of 14:41, 12 March 2012

Usage: {{list experts|page|default}}

This template will generate a list of experts on the matter described on page (defaults to {{PAGENAME}}). If there are any people who are tagged with the Property:Expertise page, then only these people will be displayed. Otherwise, people in one of its Property:Fields will be shown. It also works for category pages. default can be used to change the message that is displayed if no experts are found.

The exact presentation format may be subject to change in the future. Specifically, the desired behaviour of this template is that it should always produce two lists, one with only people with specific expertise, and one with only the relevant field experts without repeating the specific experts. However, due to limitations in the semantic mediawiki query language, it is currently not possible to generate the latter list (cannot query for absence of a specific value in multiply set properties). There is a chance that these restrictions may disappear in an upcoming version of semantic mediawiki where inline sparql queries will be supported.

Examples:

 {{list experts}}
 {{list experts|page=HMMER}}