Template:MDN: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (mention you can't use underscores, improve example)
(mention mdc: prefix)
 
Line 21: Line 21:
Blanks in MDN page paths do not work, you must use underscores.
Blanks in MDN page paths do not work, you must use underscores.


The [https://{{SERVERNAME}}/api.php?action=query&meta=siteinfo&siprop=interwikimap&format=xml interwiki map] for {{SERVERNAME}} includes an <tt>mdc</tt> (the old "Mozilla Developer ''Center''" name) prefix, so <tt><nowiki>[[MDC:Migrating from Internal to Frozen Linkage]]</nowiki></tt> also works, producing [[MDC:Migrating from Internal to Frozen Linkage]].


</noinclude>[https://developer.mozilla.org/en/{{{1}}} {{{2|{{{1}}}}}}]
</noinclude>[https://developer.mozilla.org/en/{{{1}}} {{{2|{{{1}}}}}}]

Latest revision as of 23:52, 19 January 2012

Use this to link to a page in the Mozilla Developer Network.

Usage

{{MDN | path/to/page | optional link title }}

The first parameter is the path of the page's URL in the MDN, after the developer.mozilla.org/en/ part.

The optional second parameter is the text for the link.


Sample:

 {{MDN|Migrating_from_Internal_Linkage_to_Frozen_Linkage|frozen linkage}}

produces

frozen linkage

Notes

The template assumes the link is to the "en"(glish) namespace. You can prefix the path with ../language_code to refer to some other page, e.g.

 {{MDN |../fr/Firefox_3.6_pour_les_développeurs}}

produces ../fr/Firefox_3.6_pour_les_développeurs

Blanks in MDN page paths do not work, you must use underscores.

The interwiki map for wiki.mozilla.org includes an mdc (the old "Mozilla Developer Center" name) prefix, so [[MDC:Migrating from Internal to Frozen Linkage]] also works, producing MDC:Migrating from Internal to Frozen Linkage.

{{{1}}}