Template:Source
From MozillaWiki
Usage
{{source}} creates a link to source code in the mozilla-central Mercurial tree via Mozilla France's web service Mozilla Cross-Reference (MXR). It works similar to mdc:Template:Source at Mozilla Developer Network.
- Note
MXR also contains the older mozilla CVS tree.
Parameters
There are 2 parameters, both unnamed, of which 1 is required and 1 is optional.
Syntax
The template's syntax is
-
{{source|sub-path|custom link text}}
Required parameter
1
- Sub-path under /mozilla-central
Path to the resource under mozilla-central, to which you wish to link. The parameter is unnamed, so no parameter name needs to be specified.
- Usage
-
{{source|sub-path}}
Optional parameter
2
- Custom link text
If you want the link to display something other than the input for parameter 1
. The parameter is unnamed, so no parameter name needs to be specified.
- Note
- This parameter must be placed after the 1st parameter.
- Usage
-
{{source|1|custom link text}}
Examples
Correct use
Case | What you type | What you see |
---|---|---|
Sub-path | browser/Makefile.in}} | browser/Makefile.in
|
Custom link text | browser/Makefile.in|The browser's Makefile.in file}} | The browser's Makefile.in file
|
See also
The above documentation is transcluded from Template:Source/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |