Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Template:Canvas snippet/ifparam

From FlightGear wiki
Jump to: navigation, search


/ifparam parameters:

-{{{param}}}-
-{{{{{{param}}}}}}-
-{{{ifdef}}}-
-{{{else}}}-

Shown text:

{{{ifdef}}}

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

Goal

This template is used by {{canvas snippet}} to show different texts depending on if one of its parameters is defined or not.

Note The frame around the sample above will not be visible when used with {{canvas snippet}}.

Usage

{{canvas snippet/ifparam
  | param = 
  | ifdef = 
  | else  = 
}}

The only mandatory parameter is param.

param
Name of the parameter in {{Canvas snippet}}.
ifdef
Wiki text to use if the parameter is defined.
else
Wiki text to use if the parameter is not defined.

Technical details

The template adds a new row with one cell spanning two columns to a table. Each cell is used for formatting one of the parameters in {{canvas snippet}} that documents a canvas snippet.