Template:MDN: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (change MDC to MDN)
m (mention you can't use underscores, improve example)
Line 15: Line 15:


== Notes ==
== Notes ==
It assumes the link is to the "en"(glish) namespace.  You can use ../''language_code'' to refer to some other page, e.g.
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.
   <nowiki>{{</nowiki>MDN |'''../fr/'''Firefox_3.6_pour_les_développeurs |Firefox 3.6 }}
   <nowiki>{{</nowiki>MDN |'''../fr/'''Firefox_3.6_pour_les_développeurs}}
produces {{MDN |../fr/Firefox_3.6_pour_les_développeurs |Firefox 3.6}}
produces {{MDN |../fr/Firefox_3.6_pour_les_développeurs}}
 
Blanks in MDN page paths do not work, you must use underscores.




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

Revision as of 23:44, 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.


{{{1}}}