3,860
edits
No edit summary |
(Corrections and general improvements.) |
||
Line 12: | Line 12: | ||
====Mandatory parameter==== | ====Mandatory parameter==== | ||
* '''<code>1</code>''': The name of the main article | |||
This is the only mandatory parameter. No parameter name needs to be entered. If this parameter is left out, an error message will be displayed. | |||
Usage: | |||
* <code><nowiki>{{</nowiki>main article|'''1'''<nowiki>}}</nowiki></code> | |||
====Optional parameters==== | ====Optional parameters==== | ||
;Additional main articles | ;<big>Additional main articles</big> | ||
There are nine (9) optional parameters to specify additional main articles, {{Nowrap|1=<code>2</code>, <code>3</code>, …, <code>10</code>}} (no names need to be entered). The template can't contain more than 10 articles. If that limit is exceeded, an error message will be displayed. | * '''<code>2</code>–<code>10</code>''': The names of the main articles | ||
There are nine (9) optional parameters to specify additional main articles, {{Nowrap|1=<code>2</code>, <code>3</code>, …, <code>10</code>}} (no parameter names need to be entered). The template can't contain more than 10 articles. If that limit is exceeded, an error message will be displayed. | |||
Usage: | |||
* <code><nowiki>{{</nowiki>main article|1|'''2'''|'''3'''|'''4'''|'''5'''|'''6'''|'''7'''|'''8'''|'''9'''|'''10'''<nowiki>}}</nowiki></code> | |||
;<big>Custom link text</big> | |||
;Custom link text | * '''<code>l1</code>–<code>l10</code>''': Custom text | ||
There are ten (10) optional parameters to specify custom link texts for any of the referenced main articles. The parameter names use the latin letter "l" (i.e. lower-case "L") with the number of the main article to which you want to assign the custom link text | There are ten (10) optional parameters to specify custom link texts for any of the referenced main articles. The parameter names use the latin letter "l" (i.e. lower-case "L") with the number of the main article to which you want to assign the custom link text: {{Nowrap|1=<code>l1</code>, <code>l2</code>, …, <code>l10</code>}}. | ||
'''NB!''' Custom link text should only be used when absolutely necessary in order to clarify something! The main rule is to ''always'' use the main articles names as they are in the wiki. | '''NB!''' Custom link text should only be used when absolutely necessary in order to clarify something! The main rule is to ''always'' use the main articles names as they are in the wiki. | ||
Usage: | |||
* <code><nowiki>{{</nowiki>main article|1|'''l1='''One<nowiki>}}</nowiki></code> | |||
;<big>Scientific names</big> | |||
;Scientific names | * '''<code>latin</code>''': Scientific name of the organism the main article covers | ||
Lastly, there is an optional parameter for denoting scientific names of organisms, <code>latin</code>. | Lastly, there is an optional parameter for denoting scientific names of organisms, <code>latin</code>. | ||
Usage: | |||
* <code><nowiki>{{</nowiki>main article|1|'''latin='''Species prima<nowiki>}}</nowiki></code> | |||
===Examples=== | ===Examples=== | ||
====Correct use==== | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Example case !! What you write !! What you see | ! Example case !! What you write !! What you see | ||
|- | |- | ||
| | | ≤ 10 articles || <code><nowiki>{{main article|1|2|3|4|5|6|7|8|9|10}}</nowiki></code> || {{main article|1|2|3|4|5|6|7|8|9|10}} | ||
|- | |- | ||
| | | 1 article || <code><nowiki>{{main article|Contribute}}</nowiki></code> || {{main article|Contribute}} | ||
|- | |- | ||
| | | 1 article with custom link text || <code><nowiki>{{main article|Contribute|l1=Join Mozilla}}</nowiki></code> || {{main article|Contribute|l1=Join Mozilla}} | ||
|- | |- | ||
| | | 2 articles || <code><nowiki>{{main article|Contribute|Firefox}}</nowiki></code> || {{main article|Contribute|Firefox}} | ||
|- | |- | ||
| | | 2 articles with custom link texts || <code><nowiki>{{main article|Contribute|l1=Join Mozilla|Firefox|l2=Web browser}}</nowiki></code> || {{main article|Contribute|l1=Join Mozilla|Firefox|l2=Web browser}} | ||
|- | |- | ||
| | | 1 article outside the main namespace || <code><nowiki>{{main article|MozillaWiki:About}}</nowiki></code> || {{main article|MozillaWiki:About}} | ||
|- | |- | ||
| | | 2 articles outside the main namespace || <code><nowiki>{{main article|MozillaWiki:About|MozillaWiki:Accounts}}</nowiki></code> || {{main article|MozillaWiki:About|MozillaWiki:Accounts}} | ||
|- | |- | ||
| | | 1 article within and 1 article outside the main namespace || <code><nowiki>{{main article|Contribute|MozillaWiki:About}}</nowiki></code> || {{main article|Contribute|MozillaWiki:About}} | ||
|- | |||
| Scientific name || <code><nowiki>{{main article|Fennec|latin=Vulpes zerda}}</nowiki></code> || {{main article|Fennec|latin=Vulpes zerda}} | |||
|} | |||
====Incorrect use==== | |||
{| class="wikitable" | |||
|- | |- | ||
! Example case !! What you write !! What you see (error message) | |||
|- | |- | ||
| | | > 10 articles || <code><nowiki>{{main article|1|2|3|4|5|6|7|8|9|10|11}}</nowiki></code> || {{main article|1|2|3|4|5|6|7|8|9|10|11}} | ||
|- | |- | ||
| | | No parameter || <code><nowiki>{{main article}}</nowiki></code> || {{main article}} | ||
|} | |} | ||
edits