Difference between revisions of "Template:Resource info"

From SNIC Documentation
Jump to: navigation, search
m (moved Template:Resource info devel to Template:Resource info: Added "software" parameter.)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template creates a standard info blurb for a resource, and registers the relevant categories and properties. Will protest loudly in bold red if mandatory information is missing. If you do not wish to provide a certain piece of required information: do not use this template. Or else you will corrupt the database with incorrect information.
+
This template and registers the relevant categories and properties for a resource. Will protest loudly in bold red if mandatory information is missing. If you do not wish to provide a certain piece of required information: do not use this template. Or else you will corrupt the database with incorrect information.
  
 
Usage: <nowiki>{{</nowiki>resource info|''description''=|''centre''=|''name''=<nowiki>{{PAGENAME}}}}</nowiki>
 
Usage: <nowiki>{{</nowiki>resource info|''description''=|''centre''=|''name''=<nowiki>{{PAGENAME}}}}</nowiki>
  
All the parameters are named, and can be given in any order. The only readable text produced by this template is <nowiki>"{{{name}}} is {{{description}}}, and is located at {{{centre}}}."</nowiki>, and even this can be suppressed by setting ''quiet''=true. ''name'' defaults to <nowiki>{{PAGENAME}}</nowiki> and should in principle never have to be set to anything else.
+
All the parameters are named, and can be given in any order. '''description''' should be a shortest-possible style description of what the resource is, eg. it should fit into the second formatter of "%s is a %s." (note absence of capital first letter, leading word "a", and ending full stop character). ''name'' defaults to <nowiki>{{PAGENAME}}</nowiki> and should in principle never have to be set to anything else.
 +
 
 +
This template produces no readable output, but you can use its information in an opening sentence such as <nowiki>"{{PAGENAME}} is a {{#show: {{PAGENAME}}|?description}}, and is located at {{#show: {{PAGENAME}}|?centre}}."</nowiki>.  
  
 
Example:
 
Example:

Revision as of 18:53, 9 September 2011

This template and registers the relevant categories and properties for a resource. Will protest loudly in bold red if mandatory information is missing. If you do not wish to provide a certain piece of required information: do not use this template. Or else you will corrupt the database with incorrect information.

Usage: {{resource info|description=|centre=|name={{PAGENAME}}}}

All the parameters are named, and can be given in any order. description should be a shortest-possible style description of what the resource is, eg. it should fit into the second formatter of "%s is a %s." (note absence of capital first letter, leading word "a", and ending full stop character). name defaults to {{PAGENAME}} and should in principle never have to be set to anything else.

This template produces no readable output, but you can use its information in an opening sentence such as "{{PAGENAME}} is a {{#show: {{PAGENAME}}|?description}}, and is located at {{#show: {{PAGENAME}}|?centre}}.".

Example:

{{resource info
|description=a capability cluster resource of 250 Tflops with full bisection interconnect
|centre=NSC
|software=a comma separated list of pagenames for installed software
}}