User:Johan G/Repo file
[{{{base-path}}}next/tree/ flightgear/]<noinclude>
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
{{{examples}}}
Related templates
Source link templates
- {{repo link}}
- {{fgaddon url}}
- {{fgdata file}}
- {{simgear file}}
- {{flightgear file}}
Commit link templates
- {{fgaddon revision}}
- {{fgdata commit}}
- {{simgear commit}}
- {{flightgear commit}}
</noinclude>
Goal
This template is used by {{fgdata file}}, {{simgear file}} and {{flightgear file}} to give them the same styling and to reduce wikitext duplication.
This template will automatically add Category:Repository link templates to the template.
Caution Caution that might help prevent lost work, very complicated debugging etc...
Note Note that might be helpful or lead the reader in the right direction.
Usage
{{repo file | repo = | base-path = | first-section = | path = {{{path|}}} | l = {{{l|}}} | t = {{{t|}}} | r = {{{r|}}} | nopath = {{{nopath|}}} | examples = }}
All parameters are mandatory. Parameters followed by an asterisk (*) should only be used as above by the templates.
- repo
- Name of the repository. One of FGData, SimGear or FlightGear
- base-path
- Base URL path
- first-section
- Text of the first section of the template documentation
- 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
- Text to be used in the examples section of the template documentation
Examples
Examples using different options.
Known issues
Known issues and workarounds if such are known.
Related templates
- {{fgaddon url}}