Template:Seealso: Difference between revisions
More actions
Create reusable See also section template (supports embedded {{Forums}} etc.) |
m Rebuild as an inline See-also hatnote with typed slots that group same-platform links under one shared suffix |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{ | <includeonly><templatestyles src="Template:Seealso/styles.css" />{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}{{{d5|}}}{{{d6|}}}{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}{{{forum4|}}}{{{forum5|}}}{{{forum6|}}}{{{wiki1|}}}{{{wiki2|}}}{{{wiki3|}}}{{{wiki4|}}}{{{wiki5|}}}{{{wiki6|}}}{{{mc1|}}}{{{mc2|}}}{{{mc3|}}}{{{mc4|}}}{{{mc5|}}}{{{mc6|}}}|<div class="loka-seealso">''See also: {{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}{{{d5|}}}{{{d6|}}}|{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}{{{d5|}}}{{{d6|}}}|{{#if:{{{d1|}}}|[[{{{d1|}}}]]}}{{#if:{{{d2|}}}|{{#if:{{{d1|}}}|{{#if:{{{d3|}}}{{{d4|}}}{{{d5|}}}{{{d6|}}}|, | and }}}}[[{{{d2|}}}]]}}{{#if:{{{d3|}}}|{{#if:{{{d1|}}}{{{d2|}}}|{{#if:{{{d4|}}}{{{d5|}}}{{{d6|}}}|, | and }}}}[[{{{d3|}}}]]}}{{#if:{{{d4|}}}|{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}|{{#if:{{{d5|}}}{{{d6|}}}|, | and }}}}[[{{{d4|}}}]]}}{{#if:{{{d5|}}}|{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}|{{#if:{{{d6|}}}|, | and }}}}[[{{{d5|}}}]]}}{{#if:{{{d6|}}}|{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}{{{d5|}}}|{{#if:|, | and }}}}[[{{{d6|}}}]]}}}}}}{{#if:{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}{{{forum4|}}}{{{forum5|}}}{{{forum6|}}}|{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}{{{d5|}}}{{{d6|}}}|; }}{{#if:{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}{{{forum4|}}}{{{forum5|}}}{{{forum6|}}}|{{#if:{{{forum1|}}}|[https://forums.lokamc.com/threads/{{{forum1|}}} "{{{forum1label|Thread}}}"]}}{{#if:{{{forum2|}}}|{{#if:{{{forum1|}}}|{{#if:{{{forum3|}}}{{{forum4|}}}{{{forum5|}}}{{{forum6|}}}|, | and }}}}[https://forums.lokamc.com/threads/{{{forum2|}}} "{{{forum2label|Thread}}}"]}}{{#if:{{{forum3|}}}|{{#if:{{{forum1|}}}{{{forum2|}}}|{{#if:{{{forum4|}}}{{{forum5|}}}{{{forum6|}}}|, | and }}}}[https://forums.lokamc.com/threads/{{{forum3|}}} "{{{forum3label|Thread}}}"]}}{{#if:{{{forum4|}}}|{{#if:{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}|{{#if:{{{forum5|}}}{{{forum6|}}}|, | and }}}}[https://forums.lokamc.com/threads/{{{forum4|}}} "{{{forum4label|Thread}}}"]}}{{#if:{{{forum5|}}}|{{#if:{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}{{{forum4|}}}|{{#if:{{{forum6|}}}|, | and }}}}[https://forums.lokamc.com/threads/{{{forum5|}}} "{{{forum5label|Thread}}}"]}}{{#if:{{{forum6|}}}|{{#if:{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}{{{forum4|}}}{{{forum5|}}}|{{#if:|, | and }}}}[https://forums.lokamc.com/threads/{{{forum6|}}} "{{{forum6label|Thread}}}"]}} on the <span class="loka-seealso-forum-icon">[[File:Loka icon.png|14px|link=|alt=Loka]]</span> [[Loka Forums]]}}}}{{#if:{{{wiki1|}}}{{{wiki2|}}}{{{wiki3|}}}{{{wiki4|}}}{{{wiki5|}}}{{{wiki6|}}}|{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}{{{d5|}}}{{{d6|}}}{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}{{{forum4|}}}{{{forum5|}}}{{{forum6|}}}|; }}{{#if:{{{wiki1|}}}{{{wiki2|}}}{{{wiki3|}}}{{{wiki4|}}}{{{wiki5|}}}{{{wiki6|}}}|{{#if:{{{wiki1|}}}|[https://en.wikipedia.org/wiki/{{urlencode:{{{wiki1|}}}|WIKI}} {{{wiki1label|{{{wiki1|}}}}}}]}}{{#if:{{{wiki2|}}}|{{#if:{{{wiki1|}}}|{{#if:{{{wiki3|}}}{{{wiki4|}}}{{{wiki5|}}}{{{wiki6|}}}|, | and }}}}[https://en.wikipedia.org/wiki/{{urlencode:{{{wiki2|}}}|WIKI}} {{{wiki2label|{{{wiki2|}}}}}}]}}{{#if:{{{wiki3|}}}|{{#if:{{{wiki1|}}}{{{wiki2|}}}|{{#if:{{{wiki4|}}}{{{wiki5|}}}{{{wiki6|}}}|, | and }}}}[https://en.wikipedia.org/wiki/{{urlencode:{{{wiki3|}}}|WIKI}} {{{wiki3label|{{{wiki3|}}}}}}]}}{{#if:{{{wiki4|}}}|{{#if:{{{wiki1|}}}{{{wiki2|}}}{{{wiki3|}}}|{{#if:{{{wiki5|}}}{{{wiki6|}}}|, | and }}}}[https://en.wikipedia.org/wiki/{{urlencode:{{{wiki4|}}}|WIKI}} {{{wiki4label|{{{wiki4|}}}}}}]}}{{#if:{{{wiki5|}}}|{{#if:{{{wiki1|}}}{{{wiki2|}}}{{{wiki3|}}}{{{wiki4|}}}|{{#if:{{{wiki6|}}}|, | and }}}}[https://en.wikipedia.org/wiki/{{urlencode:{{{wiki5|}}}|WIKI}} {{{wiki5label|{{{wiki5|}}}}}}]}}{{#if:{{{wiki6|}}}|{{#if:{{{wiki1|}}}{{{wiki2|}}}{{{wiki3|}}}{{{wiki4|}}}{{{wiki5|}}}|{{#if:|, | and }}}}[https://en.wikipedia.org/wiki/{{urlencode:{{{wiki6|}}}|WIKI}} {{{wiki6label|{{{wiki6|}}}}}}]}} on the <span class="loka-seealso-wiki-icon">[[File:Wikipedia icon.svg|14px|link=|alt=Wikipedia]]</span> English Wikipedia}}}}{{#if:{{{mc1|}}}{{{mc2|}}}{{{mc3|}}}{{{mc4|}}}{{{mc5|}}}{{{mc6|}}}|{{#if:{{{d1|}}}{{{d2|}}}{{{d3|}}}{{{d4|}}}{{{d5|}}}{{{d6|}}}{{{forum1|}}}{{{forum2|}}}{{{forum3|}}}{{{forum4|}}}{{{forum5|}}}{{{forum6|}}}{{{wiki1|}}}{{{wiki2|}}}{{{wiki3|}}}{{{wiki4|}}}{{{wiki5|}}}{{{wiki6|}}}|; }}{{#if:{{{mc1|}}}{{{mc2|}}}{{{mc3|}}}{{{mc4|}}}{{{mc5|}}}{{{mc6|}}}|{{#if:{{{mc1|}}}|[https://minecraft.wiki/w/{{urlencode:{{{mc1|}}}|WIKI}} {{{mc1label|{{{mc1|}}}}}}]}}{{#if:{{{mc2|}}}|{{#if:{{{mc1|}}}|{{#if:{{{mc3|}}}{{{mc4|}}}{{{mc5|}}}{{{mc6|}}}|, | and }}}}[https://minecraft.wiki/w/{{urlencode:{{{mc2|}}}|WIKI}} {{{mc2label|{{{mc2|}}}}}}]}}{{#if:{{{mc3|}}}|{{#if:{{{mc1|}}}{{{mc2|}}}|{{#if:{{{mc4|}}}{{{mc5|}}}{{{mc6|}}}|, | and }}}}[https://minecraft.wiki/w/{{urlencode:{{{mc3|}}}|WIKI}} {{{mc3label|{{{mc3|}}}}}}]}}{{#if:{{{mc4|}}}|{{#if:{{{mc1|}}}{{{mc2|}}}{{{mc3|}}}|{{#if:{{{mc5|}}}{{{mc6|}}}|, | and }}}}[https://minecraft.wiki/w/{{urlencode:{{{mc4|}}}|WIKI}} {{{mc4label|{{{mc4|}}}}}}]}}{{#if:{{{mc5|}}}|{{#if:{{{mc1|}}}{{{mc2|}}}{{{mc3|}}}{{{mc4|}}}|{{#if:{{{mc6|}}}|, | and }}}}[https://minecraft.wiki/w/{{urlencode:{{{mc5|}}}|WIKI}} {{{mc5label|{{{mc5|}}}}}}]}}{{#if:{{{mc6|}}}|{{#if:{{{mc1|}}}{{{mc2|}}}{{{mc3|}}}{{{mc4|}}}{{{mc5|}}}|{{#if:|, | and }}}}[https://minecraft.wiki/w/{{urlencode:{{{mc6|}}}|WIKI}} {{{mc6label|{{{mc6|}}}}}}]}} on the <span class="loka-seealso-mc-icon">[[File:MCwiki icon.png|14px|link=|alt=Minecraft Wiki]]</span> Minecraft Wiki}}}}''</div>}}</includeonly><noinclude> | ||
== | |||
{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}{{#if:{{{ | |||
}}</div>}}</includeonly><noinclude> | |||
== Usage == | == Usage == | ||
An inline "See also: ..." hatnote (like Wikipedia's own [[wikipedia:Template:See also|Template:See also]]) for the top of an article or section -- not a bottom-of-page "== See also ==" heading. Each item is typed, not raw wikitext, so the template can group same-platform items under one shared "on the ..." instead of repeating it per item. | |||
<pre>{{Seealso | <pre>{{Seealso|d1=Riverside I|forum1=292|forum2=310|wiki1=Minecraft}}</pre> | ||
| | |||
| | |||
| | |||
}}</pre> | |||
If | Renders as: ''See also: [[Riverside I]], "Thread" and "Thread" on the [[File:Loka icon.png|14px|link=|alt=Loka]] [[Loka Forums]]; [https://en.wikipedia.org/wiki/Minecraft Minecraft] on the [[File:Wikipedia icon.svg|14px|link=|alt=Wikipedia]] English Wikipedia'' | ||
== Parameters == | |||
{| class="wikitable" | |||
! Parameter | |||
! Description | |||
|- | |||
| <code>d1</code> .. <code>d6</code> | |||
| Plain domestic wiki article titles, e.g. <code>d1=Riverside I</code>. No suffix -- just a normal wikilink. | |||
|- | |||
| <code>forum1</code> .. <code>forum6</code> | |||
| Forums thread IDs, same as [[Template:Forums]]'s <code>id</code>. Optional matching <code>forumNlabel</code> (e.g. <code>forum1label</code>) sets that item's text, defaulting to "Thread". | |||
|- | |||
| <code>wiki1</code> .. <code>wiki6</code> | |||
| English Wikipedia article titles, same as [[Template:Wikipedia]]'s <code>article</code>. Optional matching <code>wikiNlabel</code> sets that item's text, defaulting to the title itself. | |||
|- | |||
| <code>mc1</code> .. <code>mc6</code> | |||
| minecraft.wiki article titles, same as [[Template:MCwiki]]'s <code>article</code>. Optional matching <code>mcNlabel</code> sets that item's text, defaulting to the title itself. | |||
|} | |||
Groups render in a fixed order (domestic, then Forums, then Wikipedia, then minecraft.wiki), each internally joined "A, B and C" (no Oxford comma), with different groups separated by "; ". Two or more items in the same group share one "on the ..." suffix instead of each repeating it. If nothing is given, nothing renders at all. | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 22:18, 19 August 2026
Usage
An inline "See also: ..." hatnote (like Wikipedia's own Template:See also) for the top of an article or section -- not a bottom-of-page "== See also ==" heading. Each item is typed, not raw wikitext, so the template can group same-platform items under one shared "on the ..." instead of repeating it per item.
{{Seealso|d1=Riverside I|forum1=292|forum2=310|wiki1=Minecraft}}
Renders as: See also: Riverside I, "Thread" and "Thread" on the
Loka Forums; Minecraft on the
English Wikipedia
Parameters
| Parameter | Description |
|---|---|
d1 .. d6
|
Plain domestic wiki article titles, e.g. d1=Riverside I. No suffix -- just a normal wikilink.
|
forum1 .. forum6
|
Forums thread IDs, same as Template:Forums's id. Optional matching forumNlabel (e.g. forum1label) sets that item's text, defaulting to "Thread".
|
wiki1 .. wiki6
|
English Wikipedia article titles, same as Template:Wikipedia's article. Optional matching wikiNlabel sets that item's text, defaulting to the title itself.
|
mc1 .. mc6
|
minecraft.wiki article titles, same as Template:MCwiki's article. Optional matching mcNlabel sets that item's text, defaulting to the title itself.
|
Groups render in a fixed order (domestic, then Forums, then Wikipedia, then minecraft.wiki), each internally joined "A, B and C" (no Oxford comma), with different groups separated by "; ". Two or more items in the same group share one "on the ..." suffix instead of each repeating it. If nothing is given, nothing renders at all.