Template:Fgdata file: Difference between revisions

Jump to navigation Jump to search
Add "line" parameter; related templates
(New template. @Johan, can you you please see my latest comment at Template talk:Repo link)
 
(Add "line" parameter; related templates)
Line 6: Line 6:
       | <!-- Yes. Add a trailing slash and tilde after the reference (needed for the SourceForge URL). --><!--
       | <!-- Yes. Add a trailing slash and tilde after the reference (needed for the SourceForge URL). --><!--
         -->/~
         -->/~
     }}/tree/{{{1|}}} fgdata/{{{1|}}}] ({{{2}}})
     }}/tree/{{{1|}}}<!--
    -->{{#if: {{{3|}}} <!-- Is a line defined? -->
      | &#35;l{{{3}}}
    }} fgdata/{{{1|}}}] ({{{2}}}{{#if: {{{3|}}} | ,&nbsp;line&nbsp;{{{3}}} }})
   | <!-- No, a commit reference is not defined.  Fall back on "next" and do not display commit reference. --><!--
   | <!-- No, a commit reference is not defined.  Fall back on "next" and do not display commit reference. --><!--
     -->next/tree/{{{1|}}} fgdata/{{{1|}}}]
     -->next/tree/{{{1|}}}<!--
    -->{{#if: {{{3|}}} <!-- Is a line defined? -->
      | &#35;l{{{3}}}
    }} fgdata/{{{1|}}}]{{#if: {{{3|}}} | &nbsp;(line&nbsp;{{{3}}}) }}
}}<noinclude>
}}<noinclude>
{{Informative template|1=
{{Informative template|1=
Line 16: Line 22:


== Usage ==
== Usage ==
  {{obr}}'''fgdata file'''{{!}}''path''{{!}}''reference''{{cbr}}
  {{obr}}'''fgdata file'''{{!}}''path''{{!}}''reference''{{!}}''line''{{cbr}}


Both parameters are optional.
Both parameters are optional.
Line 23: Line 29:


; 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.
; 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.
: {{inote|This parameter will not work if the linked file is of a certain file type, such as <code>.nas</code>. However, this is to do with SourceForge, not the template.}}


== Examples ==
== Examples ==
Line 42: Line 51:
  {{obr}}fgdata file{{!}}Nasal/geo.nas{{!}}0d4a86e3d454a526d561be4354e0dd26bb5f6daf{{cbr}}
  {{obr}}fgdata file{{!}}Nasal/geo.nas{{!}}0d4a86e3d454a526d561be4354e0dd26bb5f6daf{{cbr}}
{{fgdata file|Nasal/geo.nas|0d4a86e3d454a526d561be4354e0dd26bb5f6daf}}
{{fgdata file|Nasal/geo.nas|0d4a86e3d454a526d561be4354e0dd26bb5f6daf}}
=== Line parameter given ===
{{obr}}fgdata file{{!}}Huds/default.xml{{!}}{{!}}4{{cbr}}
{{fgdata file|Huds/default.xml||4}}
{{obr}}fgdata file{{!}}Huds/default.xml{{!}}5ae5154a{{!}}4{{cbr}}
{{fgdata file|Huds/default.xml|5ae5154a|4}}


== Related templates ==
== Related templates ==
Line 47: Line 63:
* {{tl|flightgear file}}
* {{tl|flightgear file}}
* {{tl|simgear file}}
* {{tl|simgear file}}
* {{tl|fgaddon url}}


}}
}}

Navigation menu