Template:Fgaddon aircraft source

From FlightGear wiki
Revision as of 09:56, 24 February 2016 by Bugman (talk | contribs) (Added the file parameter to allow this template to match the behaviour of all the other repository file templates.)
Jump to navigation Jump to search

http://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/

The following template description is not displayed when the template is inserted in an article.

Goal

This template will return the URL of an FGAddon aircraft if given the name of the aircraft directory in the repository, and optionally a file in that aircraft's directory.

Usage

{{fgaddon url|aircraft|path|r=|b=|l=|file=}}

All parameters are optional.

aircraft
Aircraft directory name. If empty the URL of trunk/Aircraft/ will be returned.
path
What follows after the aircraft's repository name in the URL. Can be the path to a file or a directory.
r
Revision number to use instead of HEAD.
b
Branch name to use instead of trunk.
l
Used with the path parameter to link to a given line in a file.
Note Due to SourceForge limitations this parameter does not fork for some file types, in particular .nas (Nasal) files.
file
If set, then a link to the file rather than the full URL will be shown.


Examples

No parameters given

{{fgaddon url}}

https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk

Aircraft given

{{fgaddon url|737-200}}

https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/737-200

Revision number given

{{fgaddon url|ec135|r=560}}

https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/ec135

Branch name given

{{fgaddon url|B-1B|b=release-3.6.0}}

https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/release-3.6.0/B-1B

Path and line number given

{{fgaddon url|F-15|Nasal/fox2.nas}}

https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/F-15

{{fgaddon url|F-15|f15c-set.xml|l=8}}

https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/F-15#l8

Usage in a wiki URL

[{{fgaddon url|F-15|Nasal/fox2.nas}} The F-15's missile system]

The F-15's missile system

Pointer to a file

{{fgaddon url|F-15|Nasal/fox2.nas|file=yes}}

https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/F-15


Related templates

Source link templates

Commit link templates