Template:Func link: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Link to Nasal library)
(Update doc)
Line 141: Line 141:


== Examples ==
== Examples ==
This example uses the pre-made links for certain APIs.
{{inote|<code><nowiki>{{Func link|maketimer()}}</nowiki></code> is equivalent.}}
  <nowiki>{{Func link|maketimer}} is available in FG 2.11+</nowiki>
  <nowiki>{{Func link|maketimer}} is available in FG 2.11+</nowiki>
{{Func link|maketimer}} is available in FG 2.11+


{{Func link|maketimer}} is available in FG 2.11+
----


  <nowiki>See also {{Func link|http.load()|page=List_of_Nasal_extension_functions}}.</nowiki>
Link to another wiki page:
  <nowiki>See also {{Func link|http.load()|page=Nasal library}}.</nowiki>
See also {{Func link|http.load()|page=Nasal library}}.


See also {{Func link|http.load()|page=List_of_Nasal_extension_functions}}.
----


Link to external site:
  <nowiki>{{Func link|printf()|ext=http://en.wikipedia.org/wiki/Printf_format_string}}</nowiki>
  <nowiki>{{Func link|printf()|ext=http://en.wikipedia.org/wiki/Printf_format_string}}</nowiki>
{{Func link|printf()|ext=http://en.wikipedia.org/wiki/Printf_format_string}}
{{Func link|printf()|ext=http://en.wikipedia.org/wiki/Printf_format_string}}



Revision as of 17:58, 11 February 2015

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

Goal

This template can be used to add a link to the documentation of a Nasal API function. It can also be used for others (for example C++ functions) and can link to external sites.

Usage

{{Func link|api|page|ext}}

All parameters except api are optional

api
Name of the function to link to.
page
Link to another wiki page, for example Help:Template.
ext
External link to another site. Overrides page.

Examples

This example uses the pre-made links for certain APIs.

Note{{Func link|maketimer()}} is equivalent.

{{Func link|maketimer}} is available in FG 2.11+

maketimer() is available in FG 2.11+


Link to another wiki page:

See also {{Func link|http.load()|page=Nasal library}}.

See also http.load().


Link to external site:

{{Func link|printf()|ext=http://en.wikipedia.org/wiki/Printf_format_string}}

printf()