Module:ExternalLinks/doc: Difference between revisions
Appearance
Created page with "== Module:ExternalLinks == This module defines a centralized table of commonly used external URLs for BadWolfMC. It is invoked via the template Template:Ext-link using: <syntaxhighlight lang="wikitext"> {{ext-link|key|optional display text}} </syntaxhighlight> == How to add a new link == 1. Edit Module:ExternalLinks 2. Add a new entry to the <code>links</code> table in this format: <syntaxhighlight lang="lua"> key = { url = "https://example.com/...", l..." |
|||
| Line 9: | Line 9: | ||
== How to add a new link == | == How to add a new link == | ||
# Edit [[Module:ExternalLinks]] | |||
# Add a new entry (preferably in alphabetical order) to the <code>links</code> table in this format: | |||
<syntaxhighlight lang="lua"> | #;<syntaxhighlight lang="lua"> | ||
key = { | key = { | ||
url = "https://example.com/...", | url = "https://example.com/...", | ||
| Line 17: | Line 17: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# Use it in the wiki like <code><nowiki>{{ext-link|key}}</nowiki></code> | |||
== See also == | == See also == | ||
* [[Template:Ext-link]] | * [[Template:Ext-link]] | ||
Latest revision as of 00:12, 8 May 2025
Module:ExternalLinks
This module defines a centralized table of commonly used external URLs for BadWolfMC.
It is invoked via the template Template:Ext-link using:
{{ext-link|key|optional display text}}
How to add a new link
- Edit Module:ExternalLinks
- Add a new entry (preferably in alphabetical order) to the
linkstable in this format:key = { url = "https://example.com/...", label = "Default Label" }
- Use it in the wiki like
{{ext-link|key}}