From Bohemia Interactive Community
					 
					
					
					
					
				
				
				
				
				
				|   |     | 
| Line 1: | Line 1: | 
|  | <includeonly>{{#if:{{{1|}}} |  | <includeonly>{{#if:{{{1|}}} | 
|  | | {{#if:{{{2|}}} |  | | {{#if:{{{2|}}} | 
|  | 	| {{#if:{{{3|{{{expand|}}}}}}||<div>}}<div class="columns" style="columns: {{{1}}}{{#if:{{{3|{{{expand|}}}}}}||; display: inline-block}}">{{{2}}}</div>{{#if:{{{3|{{{expand|}}}}}}||</div>}} |  | 	| <div class="noresize">{{#if:{{{3|{{{expand|}}}}}}||<div>}}<div class="columns" style="columns: {{{1}}}{{#if:{{{3|{{{expand|}}}}}}||; display: inline-block}}">{{{2}}}</div>{{#if:{{{3|{{{expand|}}}}}}||</div>}}</div> | 
|  | 	| -no columns content defined-{{TemplateCase||[[Category:Columns template usage error]]}} |  | 	| -no columns content defined-{{TemplateCase||[[Category:Columns template usage error]]}} | 
|  | }} |  | }} | 
		Latest revision as of 19:03, 12 April 2025
Creates CSS columns. It also adds the page to the Columns template usage error category on usage error.
This template is used on these pages.
Usage
{{Columns|colsInfo|content|expand}}
- colsInfo: columns CSS attribute's definition - see columns, can be:
- desired columns number, e.g 4
- column width, e.g 12em
- a mix of the two, e.g 4 12em - in this case, columns number is the maximum columns number
 
- content: to be split in columns, usually a list
- expand: named parameter. makes the columns take the whole width
Examples
| Code | Result | 
|  | -no columns information defined- | 
|  | -no columns content defined- | 
| {{Columns||
* contentA
* contentB
* contentC
* contentD
}}
 | -no columns information defined- | 
| {{Columns|2|
* contentA
* contentB
* contentC
* contentD
}}
 | 
contentAcontentBcontentCcontentD
 | 
| {{Columns|3|
* contentA
* contentB
* contentC
* contentD
}}
 | 
contentAcontentBcontentCcontentD
 | 
| {{Columns|4|
* contentA
* contentB
* contentC
* contentD
}}
 | 
contentAcontentBcontentCcontentD
 | 
| <div style="border: 1px solid red; width: 50em">
Above
{{Columns|3|
* contentA
* contentB
* contentC
* contentD
|expand= y
}}
Below
</div>
 | 
Above
 
contentAcontentBcontentCcontentD
Below
 | 
| <div style="border: 1px solid red; width: 50em">
{{Columns|3 10em|
* contentA, which can totally do with a lipsum amongst other things, yes
* contentB, which can totally do with a lipsum amongst other things, too
* contentC, which can totally do with a lipsum amongst other things, too
* contentD, which can totally do with a lipsum amongst other things, too
* contentE, which can totally do with a lipsum amongst other things, too
* contentF, which can totally do with a lipsum amongst other things, too
* contentG, which can totally do with a lipsum amongst other things, too
* contentH, which can totally do with a lipsum amongst other things, too
* contentI, which can totally do with a lipsum amongst other things, too
* contentJ, which can totally do with a lipsum amongst other things, too
}}
</div>
 | 
contentA, which can totally do with a lipsum amongst other things, yescontentB, which can totally do with a lipsum amongst other things, toocontentC, which can totally do with a lipsum amongst other things, toocontentD, which can totally do with a lipsum amongst other things, toocontentE, which can totally do with a lipsum amongst other things, toocontentF, which can totally do with a lipsum amongst other things, toocontentG, which can totally do with a lipsum amongst other things, toocontentH, which can totally do with a lipsum amongst other things, toocontentI, which can totally do with a lipsum amongst other things, toocontentJ, which can totally do with a lipsum amongst other things, too
 |