Template:Func link: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(to be continued)
(add doc)
Line 1: Line 1:
<includeonly>[[<!--
<includeonly>{{#switch: {{{api|error}}}
-->{{#if: {{{2|}}} | {{{2}}} | {{FULLPAGENAME}} }}<!--
| error = <big style="color:red">Missing argument!</big> <!-- error message -->
-->#{{{1}}}|<tt>{{{1}}}</tt>]]</includeonly>
<!-- defaults below -->
| maketimer
| maketimer() = [[List_of_Nasal_extension_functions#maketimer.28.29_.282.11.2B.29|<tt>maketimer()</tt>]]
| #default = {{#if: {{{ext|}}}<!-- check if an external link is supplied
-->| [{{{ext}}} <tt>{{{api}}}</tt>] <!-- yes, so link to that
-->| [[<!--  no so add wikilink
-->{{#if: {{{page|}}} <!-- is it on a different page?
-->| {{{page}}} <!-- yes -->
| {{FULLPAGENAME}} }} <!-- no, it's on this page
-->#{{{api}}}|<tt>{{{api}}}</tt>]] <!-- finish the link
-->}}}}</includeonly><noinclude>{{Informative template|1=
__NOTOC__
== 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 (e.g., C++ functions) and can link to external sites.
 
== Usage ==
<nowiki>{{</nowiki>'''Func link'''<nowiki>|</nowiki>''api''<nowiki>|</nowiki>''page''<nowiki>|</nowiki>''ext''<nowiki>}}</nowiki>
 
 
 
}}
</noinclude>

Revision as of 15:23, 28 January 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 (e.g., C++ functions) and can link to external sites.

Usage

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