Template:For/doc: Difference between revisions

From Space Station 14 Wiki
defaultloadout-wikigg>Karmaworks
Created page with "== Summary == <templatedata> { "params": { "1": { "label": "Term", "description": "The term page.", "example": "Term Page", "type": "wiki-page-name", "suggested": true }, "2": { "label": "Alternative", "description": "The alternative page.", "example": "Alternative Page", "type": "wiki-page-name", "suggested": true }, "3": { "label": "Second Alternative", "description": "A second alternative page.", "example": "Second Alt..."
 
defaultloadout-wikigg>Karmaworks
No edit summary
Line 4: Line 4:
"params": {
"params": {
"1": {
"1": {
"label": "Term",
"label": "Topic",
"description": "The term page.",
"description": "The topic the",
"example": "Term Page",
"example": "Term Page",
"type": "wiki-page-name",
"type": "wiki-page-name",
"suggested": true
"required": true
},
},
"2": {
"2": {
"label": "Alternative",
"label": "Related Page",
"description": "The alternative page.",
"description": "A related page.",
"example": "Alternative Page",
"example": "Related Name",
"type": "wiki-page-name",
"type": "wiki-page-name",
"suggested": true
"required": true
},
},
"3": {
"3": {
"label": "Second Alternative",
"label": "Second Page",
"description": "A second alternative page.",
"description": "A second related page.",
"example": "Second Alternative Page",
"example": "Second Related Page",
"type": "wiki-page-name"
"type": "wiki-page-name"
},
},
"4": {
"4": {
"label": "Third Alternative",
"label": "Third Page",
"description": "A third alternative page.",
"description": "A third related page.",
"example": "Third Alternative Page",
"example": "Third Related Page",
            "type": "wiki-page-name"
"type": "wiki-page-name"
}
},
"text": {}
},
},
"description": "This hatnote template is meant to be used to related pages the reader might want to visit.",
"description": "This hatnote template is meant to be used to show pages related to a topic the reader might want to visit.",
"paramOrder": [
"paramOrder": [
"1",
"1",
"2",
"2",
"3",
"3",
        "4"
"4",
"text"
],
],
"format": "inline"
"format": "inline"
Line 44: Line 46:
! Code !! Result
! Code !! Result
|-
|-
| <code><nowiki>{{Distinguish|Page One}}</nowiki></code> || {{Distinguish|Page One}}
| <code><nowiki>{{For|Topic|Page One}}</nowiki></code> || {{For|Topic|Page One}}
|-
|-
| <code><nowiki>{{Distinguish|Page One|Page Two}}</nowiki></code> || {{Distinguish|Page One|Page Two}}
| <code><nowiki>{{For|Topic|Page One|Page Two}}</nowiki></code> || {{For|Topic|Page One|Page Two}}
|-
|-
| <code><nowiki>{{Distinguish|Page One|Page Two|Page Three}}</nowiki></code> || {{Distinguish|Page One|Page Two|Page Three}}
| <code><nowiki>{{For|Topic|Page One|Page Two|Page Three}}</nowiki></code> || {{For|Topic|Page One|Page Two|Page Three}}
|-
|-
| <code><nowiki>{{Distinguish|Page One{{!}}Page 1}}</nowiki></code> || {{Distinguish|Page One{{!}}Page 1}}
| <code><nowiki>{{For|Topic|Page One{{!}}Page 1}}</nowiki></code> || {{For|Topic|Page One{{!}}Page 1}}
|-
|-
| <code><nowiki>{{Distinguish|text = Page 1, another name for [[Page One]]}}</nowiki></code> || {{Distinguish|text = Page 1, another name for [[Page One]]}}
| <code><nowiki>{{For|Topic|text = Page 1, another name for [[Page One]]}}</nowiki></code> || {{For|Topic|text = Page 1, another name for [[Page One]]}}
|}
|}



Revision as of 20:36, 12 April 2024

Summary

This hatnote template is meant to be used to show pages related to a topic the reader might want to visit.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Topic1

The topic the

Example
Term Page
Page namerequired
Related Page2

A related page.

Example
Related Name
Page namerequired
Second Page3

A second related page.

Example
Second Related Page
Page nameoptional
Third Page4

A third related page.

Example
Third Related Page
Page nameoptional
texttext

no description

Unknownoptional

Examples

Code Result
{{For|Topic|Page One}}
For Topic, see Page One.
{{For|Topic|Page One|Page Two}}
For Topic, see Page One and Page Two.
{{For|Topic|Page One|Page Two|Page Three}}
For Topic, see Page One, Page Two and Page Three.
{{For|Topic|Page One{{!}}Page 1}}
For Topic, see Page 1.
{{For|Topic|text = Page 1, another name for [[Page One]]}}
For Topic, see [[{{{2}}}]].

Dependencies

This template requires the {{Hatnote}} metatemplate.

Source

Roughly based on Wikipedia's For Template.