Jump to content

Do not begin to migrate content here, it may be wiped without notice. More info.

Template:InterWiki: Difference between revisions

From Debian Wiki
No edit summary
No edit summary
Line 1: Line 1:
<pre><onlyinclude>[{{{URL|{{{2|}}}}}}{{{suffix|{{{3|}}}}}}<nowiki> </nowiki>{{#if:{{{text|{{{4|}}}}}}|{{{text|{{{4|}}}}}}|{{{prefix|{{{1|}}}}}}:{{{suffix|{{{3|}}}}}}}}]</onlyinclude></pre>
<pre><onlyinclude>[{{{prefix|{{{1|}}}}}}:{{{suffix|{{{2|}}}}}}{{#if:{{{text|{{{3|}}}}}}|<nowiki> </nowiki>{{{text|{{{3|}}}}}}}}]</onlyinclude></pre>


<templatedata>
<templatedata>
Line 8: Line 8:
             "type": "line",
             "type": "line",
             "required": true,
             "required": true,
             "description": "Prefix typed by the user",
             "description": "URL prefix",
             "aliases": ["1"],
             "aliases": ["1"],
             "example": "WikiPedia"
             "example": "WikiPedia"
        },
        "URL": {
            "type": "line",
            "required": true,
            "description": "first part of the URL",
            "aliases": ["2"],
            "example": "https://en.wikipedia.org/wiki/"
         },
         },
         "suffix": {
         "suffix": {
Line 23: Line 16:
             "required": true,
             "required": true,
             "description": "URL suffix to link to",
             "description": "URL suffix to link to",
             "aliases": ["3"]
             "aliases": ["2"]
         },
         },
         "text": {
         "text": {
Line 29: Line 22:
             "required": false,
             "required": false,
             "description": "Link text",
             "description": "Link text",
             "aliases": ["4"]
             "aliases": ["3"]
         }
         }
     }
     }
Line 37: Line 30:
The old wiki had an [https://wiki.debian.org/InterWikiMap inter-wiki map], for links like <kbd><nowiki>[[WikiPedia:article]]</nowiki></kbd>.  MediaWiki also supports [https://www.mediawiki.org/wiki/Manual:Interwiki interwiki links], but some links need complex handling that's better implemented with templates.
The old wiki had an [https://wiki.debian.org/InterWikiMap inter-wiki map], for links like <kbd><nowiki>[[WikiPedia:article]]</nowiki></kbd>.  MediaWiki also supports [https://www.mediawiki.org/wiki/Manual:Interwiki interwiki links], but some links need complex handling that's better implemented with templates.


This page contains a fallback template for links that don't have any special handling.
This page contains a fallback template for links that don't have any special handling.  If you add a template that relies on this page, make sure to also add the prefix to [[Special:Interwiki]].


[[Category:InterWikiLinkTemplate]]
[[Category:InterWikiLinkTemplate]]

Revision as of 14:45, 30 August 2025

<onlyinclude>[{{{prefix|{{{1|}}}}}}:{{{suffix|{{{2|}}}}}}{{#if:{{{text|{{{3|}}}}}}| {{{text|{{{3|}}}}}}}}]</onlyinclude>

InterWiki-style link

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
prefixprefix 1

URL prefix

Example
WikiPedia
Linerequired
suffixsuffix 2

URL suffix to link to

Linerequired
texttext 3

Link text

Lineoptional

The old wiki had an inter-wiki map, for links like [[WikiPedia:article]]. MediaWiki also supports interwiki links, but some links need complex handling that's better implemented with templates.

This page contains a fallback template for links that don't have any special handling. If you add a template that relies on this page, make sure to also add the prefix to Special:Interwiki.