Template:Conditional template call with newline/doc

This template calls template with parameter  and adds a newline at the end, all under condition. Successive calls should not be separated by a newline.

This templates has been used to avoid writing out the condition twice, once for the template call and once for the newline, but also Template:If can be used to preserve newlines.

Sample 1
Example using Template:2x, which simply repeats its argument twice, so  produces. One can combine this with in the following code


 * which produces

Notice how is suppressed, and there is a newline between  and.

Sample 2
Sample usage with full substitution of the template to create a newline in wikitext.

1. Create a sample template : "Template:testnewline"  ABC1 DEF

2. When called empty, it generates the following wikitext: ABC DEF

3. When called as, it generates the following wikitext (note the newline): ABC

DEF

Mandatory parameters

 * 1 : 1st unnamed parameter, a condition to be evaluated. Should result in 1 for true or 0 for false. One can use the result 0 or 1 directly. If the condition is true, the second template will be called and a newline added afterwards. Sample condition: . The condition is true if the template is called with a parameter "align=somevalue", it's false if align is not included.
 * 2 : 2nd unnamed parameter, the name of template to be called. Can be "!" for Template:! or even "void" for Template:Void

Optional parameters

 * 3 : 3rd unnamed parameter, value to be assigned to when calling template
 * substctc : for substitution of some parser functions and auxiliary templates called inside the template, use the value "subst:"; recommended when the template is substituted; note that in that case any parser functions or templates in the condition have to be substituted too.
 * subst : for substitution of template, use the value "subst:"
 * p1n : name of an additional parameter used by template
 * p1v : value to be assigned to when calling template