Difference between revisions of "Template:For2/doc"

From blackwiki
Jump to navigation Jump to search
imported>Shellwood
m (Reverted edits by 2605:A000:1109:2168:A0E7:D06C:F38B:C5CE (talk) to last version by Shellwood)
imported>Ost316
(updating to reflect change from last year and add TemplateData)
Line 4: Line 4:
  
 
===With one topic===
 
===With one topic===
* {{tlx|For2|TOPIC|<nowiki>CUSTOM TEXT</nowiki>}} → {{For2|TOPIC|CUSTOM TEXT}}  
+
* {{tlx|For2|TOPIC|CUSTOM TEXT}} → {{For2|TOPIC|CUSTOM TEXT}}  
  
 
===With more than one topic===
 
===With more than one topic===
This template also supports up to three topics and their suggested articles:
+
This template also supports up to five topics and their suggested articles:
 
* {{tlx|For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2}} → {{For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2}}
 
* {{tlx|For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2}} → {{For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2}}
* {{tlx|For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2|TOPIC 3|CUSTOM TEXT 3}} → {{For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2|TOPIC 3|CUSTOM TEXT 3}}
+
* {{tlx|For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2|TOPIC 3|CUSTOM TEXT 3|TOPIC 4|CUSTOM TEXT 4|TOPIC 5|CUSTOM TEXT 5}} → {{For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2|TOPIC 3|CUSTOM TEXT 3|TOPIC 4|CUSTOM TEXT 4|TOPIC 5|CUSTOM TEXT 5}}
  
 
===Wikilinks and capitalization===
 
===Wikilinks and capitalization===
 
'''Style note:''' When the context around a wikilink discusses the destination article itself (e.g., For more information, see ''Xyz''; Main article: ''Xyz''; This is discussed in ''Xyz'') rather than the topic of that article (e.g., Tailors often use ''xyz'' on their clients' pants), use the capitalization of the article's title in the wikilinked text: <nowiki>[[Xyz]]</nowiki>. The same applies to subheadings: <nowiki>[[Xyz#PDQ|Xyz § PDQ]]</nowiki>.
 
'''Style note:''' When the context around a wikilink discusses the destination article itself (e.g., For more information, see ''Xyz''; Main article: ''Xyz''; This is discussed in ''Xyz'') rather than the topic of that article (e.g., Tailors often use ''xyz'' on their clients' pants), use the capitalization of the article's title in the wikilinked text: <nowiki>[[Xyz]]</nowiki>. The same applies to subheadings: <nowiki>[[Xyz#PDQ|Xyz § PDQ]]</nowiki>.
 +
 +
==TemplateData==
 +
{{TemplateDataHeader}}
 +
<templatedata>
 +
{
 +
"description": "This template lists up to five articles on alternative meanings of a term. For further details and examples see the template documentation.",
 +
"params": {
 +
"1": {
 +
"label": "First description",
 +
"description": "A phrase describing an alternative meaning",
 +
"default": "other uses",
 +
"type": "string",
 +
"required": true,
 +
"example": "other people with the surname Smith"
 +
},
 +
"2": {
 +
"label": "First link",
 +
"description": "A phrase including a wikilink to the first alternative meaning.",
 +
"type": "string",
 +
"required": true,
 +
"example": "[[Smith (surname)]]"
 +
},
 +
"3": {
 +
"label": "Second description",
 +
"description": "A phrase describing another meaning, if any",
 +
"type": "string",
 +
"required": false,
 +
"example": "people with the given name Smith"
 +
},
 +
"4": {
 +
"label": "Second link",
 +
"description": "A page to link to for another meaning, if any.",
 +
"type": "string",
 +
"required": false,
 +
"example": "[[Smith (given name)]]"
 +
},
 +
"5": {
 +
"label": "Third description",
 +
"description": "A phrase describing another meaning, if any",
 +
"type": "string",
 +
"required": false,
 +
},
 +
"6": {
 +
"label": "Third link",
 +
"description": "A page to link to for another meaning, if any.",
 +
"type": "string",
 +
"required": false
 +
},
 +
"7": {
 +
"label": "Fourth description",
 +
"description": "A phrase describing another meaning, if any",
 +
"type": "string",
 +
"required": false
 +
},
 +
"8": {
 +
"label": "Fourth link",
 +
"description": "A page to link to for another meaning, if any.",
 +
"type": "string",
 +
"required": false
 +
},
 +
"9": {
 +
"label": "Fifth description",
 +
"description": "A phrase describing another meaning, if any",
 +
"type": "string",
 +
"required": false
 +
},
 +
"10": {
 +
"label": "Fifth link",
 +
"description": "A page to link to for another meaning, if any.",
 +
"type": "string",
 +
"required": false
 +
}
 +
},
 +
"format": "inline"
 +
}
 +
</templatedata>
  
 
{{Hatnote templates}}<includeonly>
 
{{Hatnote templates}}<includeonly>

Revision as of 15:38, 29 May 2019

Usage

Modelled after {{For}}, {{For2}} was created to allow custom text, including such modifications as quotation marks or a link, as part of both a topic and its suggested article.

With one topic

  • {{For2|TOPIC|CUSTOM TEXT}}

With more than one topic

This template also supports up to five topics and their suggested articles:

  • {{For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2}}
  • {{For2|TOPIC|CUSTOM TEXT|TOPIC 2|CUSTOM TEXT 2|TOPIC 3|CUSTOM TEXT 3|TOPIC 4|CUSTOM TEXT 4|TOPIC 5|CUSTOM TEXT 5}}

Wikilinks and capitalization

Style note: When the context around a wikilink discusses the destination article itself (e.g., For more information, see Xyz; Main article: Xyz; This is discussed in Xyz) rather than the topic of that article (e.g., Tailors often use xyz on their clients' pants), use the capitalization of the article's title in the wikilinked text: [[Xyz]]. The same applies to subheadings: [[Xyz#PDQ|Xyz § PDQ]].

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for For2

Syntax error in JSON.