Template:Forums: Difference between revisions
Template page
More actions
Create Forums link template |
m Replace reader-visible prose double hyphens with a proper em dash entity |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><templatestyles src="Template:Forums/styles.css" />{{#if:{{{id|{{{1|}}}}}}|<span class="loka-forums-link">[https://forums.lokamc.com/threads/{{{id|{{{1|}}}}}} "{{{label|{{{2|Thread}}}}}}"]{{#ifeq:{{lc:{{{on|}}}}}|no|| on the <span class="loka-forums-icon">[[File:Loka icon.png|14px|link=|alt=Loka]]</span> [[Loka Forums]]}}</span>}}</includeonly><noinclude> | <includeonly><templatestyles src="Template:Forums/styles.css" />{{#if:{{{id|{{{1|}}}}}}|<span class="loka-forums-link">[https://forums.lokamc.com/threads/{{{id|{{{1|}}}}}} "{{{label|{{{2|Thread}}}}}}"]{{#ifeq:{{lc:{{{on|{{{3|}}}}}}}}|no|| on the <span class="loka-forums-icon">[[File:Loka icon.png|14px|link=|alt=Loka]]</span> [[Loka Forums]]}}</span>}}</includeonly><noinclude> | ||
== Usage == | == Usage == | ||
| Line 6: | Line 6: | ||
Renders as: "Thread" on the [[File:Loka icon.png|14px|link=|alt=Loka]] [[Loka Forums]] | Renders as: "Thread" on the [[File:Loka icon.png|14px|link=|alt=Loka]] [[Loka Forums]] | ||
The first unnamed parameter (or <code>id</code>) is the thread's numeric ID | The first unnamed parameter (or <code>id</code>) is the thread's numeric ID — the number at the end of its forums URL, e.g. <code>292</code> for <code>https://forums.lokamc.com/threads/official-update-thread.292/</code>. The plain numeric URL (<code>https://forums.lokamc.com/threads/292</code>) resolves the same way, so the slug isn't needed. | ||
== Parameters == | == Parameters == | ||
| Line 21: | Line 21: | ||
|- | |- | ||
| <code>on</code> | | <code>on</code> | ||
| Set to <code>no</code> to omit the trailing "on the [[File:Loka icon.png|14px|link=|alt=Loka]] [[Loka Forums]]" | | Set to <code>no</code> to omit the trailing "on the [[File:Loka icon.png|14px|link=|alt=Loka]] [[Loka Forums]]" — shown by default. The third unnamed parameter also works. | ||
|} | |} | ||
<pre>{{Forums|id=292|label=the official updates thread|on=no}}</pre> | <pre>{{Forums|id=292|label=the official updates thread|on=no}}</pre> | ||
or, using unnamed parameters throughout: | |||
<pre>{{Forums|292|the official updates thread|no}}</pre> | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 14:18, 23 August 2026
Usage
{{Forums|292}}
Renders as: "Thread" on the
Loka Forums
The first unnamed parameter (or id) is the thread's numeric ID — the number at the end of its forums URL, e.g. 292 for https://forums.lokamc.com/threads/official-update-thread.292/. The plain numeric URL (https://forums.lokamc.com/threads/292) resolves the same way, so the slug isn't needed.
Parameters
| Parameter | Description |
|---|---|
id
|
The thread's numeric ID. Required. The first unnamed parameter also works. |
label
|
Text shown in quotes as the link. Defaults to "Thread". The second unnamed parameter also works. |
on
|
Set to no to omit the trailing "on the |
{{Forums|id=292|label=the official updates thread|on=no}}
or, using unnamed parameters throughout:
{{Forums|292|the official updates thread|no}}