Template:T row if

From Conservapedia

Jump to: navigation, search
The correct title of this article is Template:t row if. The initial letter is shown capitalized due to technical restrictions.

Template: T row if
Use on Templates
Use for Conditional table row
Category template applies to page (none)
Template Parameters
(See using templates).
NamePurposeRequired?Comment
1First column textyes
2Second column textyes
linklink the second column?nosee note A
link-namename of page to link tonoDefaults to parameter 2
col2txtSecond column textnoDefaults to paramter 2; see note B

If parameter 2 is not empty, then the code for a table row (wiki syntax) with two columns is returned, else nothing* is returned.

Note A:

If link=yes, the value of the second column will be a Wikilink, to the page in parameter link-name, or if that is not provided, the page in parameter 2.

Note B:

If col2txt is provided, this will be used in place of the text supplied to parameter 2, and will not be linked. If you want it linked, include the square brackets in the text of col2txt.

Example:

{| class="wikitable"
 {{t row if|Provided:|{{{yes|yes}}}}}
 {{t row if|Not Provided:|{{{no|}}}}}
|}

Displays as:

Provided:yes

*— A pair of empty <div> tags are actually returned, to avoid display problems.

Personal tools