Template:Fgdata file: Difference between revisions
Jump to navigation
Jump to search
Red Leader (talk | contribs) (Add "line" parameter; related templates) |
Red Leader (talk | contribs) m (Slightly shorten abbreviated commit IDs to match the SF abbreviation) |
||
Line 46: | Line 46: | ||
{{fgdata file|Nasal/geo.nas|release/3.6.0}} | {{fgdata file|Nasal/geo.nas|release/3.6.0}} | ||
{{obr}}fgdata file{{!}}Nasal/geo.nas{{!}} | {{obr}}fgdata file{{!}}Nasal/geo.nas{{!}}0d4a86{{cbr}} | ||
{{fgdata file|Nasal/geo.nas| | {{fgdata file|Nasal/geo.nas|0d4a86}} | ||
{{obr}}fgdata file{{!}}Nasal/geo.nas{{!}}0d4a86e3d454a526d561be4354e0dd26bb5f6daf{{cbr}} | {{obr}}fgdata file{{!}}Nasal/geo.nas{{!}}0d4a86e3d454a526d561be4354e0dd26bb5f6daf{{cbr}} | ||
Line 56: | Line 56: | ||
{{fgdata file|Huds/default.xml||4}} | {{fgdata file|Huds/default.xml||4}} | ||
{{obr}}fgdata file{{!}}Huds/default.xml{{!}} | {{obr}}fgdata file{{!}}Huds/default.xml{{!}}5ae515{{!}}4{{cbr}} | ||
{{fgdata file|Huds/default.xml| | {{fgdata file|Huds/default.xml|5ae515|4}} | ||
== Related templates == | == Related templates == |
Revision as of 10:39, 25 September 2015
The following template description is not displayed when the template is inserted in an article.
Goal
This template can be used when linking to source files or directories in the fgdata repository.
Usage
{{fgdata file|path|reference|line}}
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 fgdata repository.
- reference
- 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.
- line
- 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.
Examples
No parameters given
{{fgdata file}}
Path given
{{fgdata file|Nasal/geo.nas}}
Path and a commit reference given
{{fgdata file|Nasal/geo.nas|release/3.6.0}}
fgdata/Nasal/geo.nas (release/3.6.0)
{{fgdata file|Nasal/geo.nas|0d4a86}}
fgdata/Nasal/geo.nas (0d4a86)
{{fgdata file|Nasal/geo.nas|0d4a86e3d454a526d561be4354e0dd26bb5f6daf}}
fgdata/Nasal/geo.nas (0d4a86e3d454a526d561be4354e0dd26bb5f6daf)
Line parameter given
{{fgdata file|Huds/default.xml||4}}
fgdata/Huds/default.xml (line 4)
{{fgdata file|Huds/default.xml|5ae515|4}}
fgdata/Huds/default.xml (5ae515, line 4)
Related templates
- {{repo link}}
- {{flightgear file}}
- {{simgear file}}
- {{fgaddon url}}