Difference between revisions of "Template:Researcher"

From AIRWiki
Jump to: navigation, search
Line 14: Line 14:
 
The order of the fields is not relevant. The template should be given as the ''first'' thing on a page.
 
The order of the fields is not relevant. The template should be given as the ''first'' thing on a page.
  
</noinclude><includeonly>
+
</noinclude>
 +
 
 +
<includeonly>
 
{| style="padding:10px" align="right" cellpadding="2" cellspacing="0" width="350px"
 
{| style="padding:10px" align="right" cellpadding="2" cellspacing="0" width="350px"
  
  
 
|-
 
|-
{{Tablelongrow|Color=#336633|Style=border-top: 1px solid #808080;|Value=<b>{{{firstname}}} {{{lastname}}}</b>}}
+
{{Tablelongrow|Color=#336633|Style=border-top: 1px solid #808080;|Value=<b>{{{PAGENAME}}}</b>}}
  
 
|-
 
|-
Line 25: Line 27:
  
 
|-
 
|-
{{#ifeq:{{{firstname|}}}|||{{Tablerow|Label=First Name|Value={{{firstname}}}}}}}
+
{{#ifeq:{{{data|}}}|||{{Tablerow|Label=Data|Value={{{dataProgetto}}}}}}}
  
|-
+
|}
{{#ifeq:{{{lastname|}}}|||{{Tablerow|Label=Last Name|Value={{{lastname}}}}}}}
+
  
|-
+
[[Category:Progetto]]
{{#ifeq:{{{email|}}}|||{{Tablerow|Label=E-Mail|Value={{Mailbox|{{{email}}}}}}}}}
+
  
|-
+
</includeonly>
{{#ifeq:{{{advisor|}}}|||{{#arraymap:{{{advisor|}}}|;|x|[[hasAdvisor::User:x| ]]|}}}}
+
{{#ifeq:{{{advisor|}}}|||  {{Tablerow|Label=Advisor|Value=<ul>{{#arraymap:{{#ask: [[User:{{PAGENAME}}]] | ?hasAdvisor= }}|, |x|<li>x</li>|}}</ul>}}  }}
+
 
+
|-
+
{{#ifeq:{{{resarea|}}}|||{{#arraymap:{{{resarea|}}}|;|x|[[hasResArea::x| ]]|}}}}
+
<!-- NOTE: this solution for research areas is nicer to see, but it doesn't work fine
+
          with areas whose name contains the sequence of chars ", " as it's used as
+
          a separator for ASK results
+
{{Tablerow|Label=Research Areas|Value=<ul>{{#arraymap:{{#ask: [[User:{{PAGENAME}}]] | ?hasResArea= }}|, |x|<li>x</li>|}}</ul>}}
+
-->
+
{{Tablerow|Label=Research Areas|Value={{#ask: [[User:{{PAGENAME}}]] | ?hasResArea= }}}}
+
|}[[Category:Researcher]]</includeonly>
+

Revision as of 18:45, 29 September 2010

This template simplifies the creation of articles about researchers. When inserted in a person's page, it creates a decorative table with much helpful information. It also takes care of annotating the given data semantically, so that users can easily find it or query it in other articles. Do not try to read this page's source code for learning table syntax – there are far easier ways of creating tables in MediaWiki.

To use this template, insert the following at the beginning of your user page. All fields are strictly optional and should be omitted if no data is given.

Please delete all lines that you do not give useful information for!

{{Researcher
 | firstname=Mario
 | lastname=Rossi
 | email=mario.rossi@elet.polimi.it
 | resarea=The name of your research area
 |         ***NOTE:*** you can specify a LIST of research areas, separating them with a semicolon (;)
 | photo=name of picture (e.g. "Mario.jpg"), use "upload file" on the left
}}

The order of the fields is not relevant. The template should be given as the first thing on a page.