Template:Flightgear file: Difference between revisions
Jump to navigation
Jump to search
(+rel: Commit link templates) |
(Added a depreciation note about using the {{flightgear source}} template instead.) |
||
(One intermediate revision by the same user not shown) | |||
Line 17: | Line 17: | ||
}}<noinclude> | }}<noinclude> | ||
{{Informative template|1= | {{Informative template|1= | ||
__NOTOC__ | __NOTOC__ {{depreciated|The newer {{tl|flightgear source}} template provides far greater functionality and should be used instead. This is not a subtemplate of the master {{tl|repo link}} template.}} | ||
== Goal == | == Goal == | ||
This template can be used when linking to source files or directories in the official FlightGear repository. | This template can be used when linking to source files or directories in the official FlightGear repository. | ||
Line 73: | Line 73: | ||
== Related templates == | == Related templates == | ||
{{repo link/doc related}} | |||
}} | }} |
Latest revision as of 17:22, 23 May 2016
The following template description is not displayed when the template is inserted in an article.
Deprecated The newer {{flightgear source}} template provides far greater functionality and should be used instead. This is not a subtemplate of the master {{repo link}} template. |
Goal
This template can be used when linking to source files or directories in the official FlightGear repository.
Usage
{{flightgear file|path|l=|t=|r=|nopath=}}
Both parameters are optional.
- path
- What follows after
/tree/
in the URL. Can be the path to a file or a directory. If empty, the link will point to the root of the FlightGear repository.
- l
- A line number. This should just be a single number, as SourceForge does not support multiple line numbers.
- Note This parameter will not work if the linked file is of a certain file type, such as
.nas
. However, this is to do with SourceForge, not the template.
- r
- A commit reference. Usually the SHA-1 commit ID (which can be abbreviated), but it can also be a tag or a branch name. If empty, the link will point to the next branch.
- t
- Text to show as the URL's label instead of file path.
- nopath
- Strips off the
fgdata/
part of the URL label, leaving just the contents of the path parameter. - Note The t parameter will override this parameter.
Examples
No parameters given
{{flightgear file}}
Path given
{{flightgear file|src/Main/main.cxx}}
Path and a commit reference given
{{flightgear file|src/Main/main.cxx|r=release/3.6.0}}
flightgear/src/Main/main.cxx (release/3.6.0)
{{flightgear file|src/Main/main.cxx|r=0a822f}}
flightgear/src/Main/main.cxx (0a822f)
{{flightgear file|src/Main/main.cxx|r=0a822fb412e2fcc44028bf5412710e2fb32dc96b}}
flightgear/src/Main/main.cxx (0a822fb412e2fcc44028bf5412710e2fb32dc96b)
Line parameter given
{{flightgear file|src/Main/main.cxx|l=7}}
flightgear/src/Main/main.cxx (line 7)
{{flightgear file|src/Main/main.cxx|r=0a822f|l=7}}
flightgear/src/Main/main.cxx (0a822f, line 7)
Custom label given
{{flightgear file|src/Main/main.cxx|t=main.cxx}}
Nopath parameter given
{{flightgear file|src/Main/main.cxx|nopath=1}}
Related templates
|