Difference between revisions of "Template:Multicol"

From Shadow of the Throne Wiki
Jump to: navigation, search
(Fixed typos in the examples.)
m (43 revisions: Multicol pages)
 
(41 intermediate revisions by 14 users not shown)
Line 1: Line 1:
<noinclude>
+
<includeonly><div><!-- Do not remove this DIV: it prevents the Wiki code from inserting an extra linebreak above this table. -->
Use this template to start a multi-column section of a page.  For example:
+
{| width="{{{1|100%}}}" border="0" cellspacing="0" cellpadding="0" style="background-color:transparent;table-layout:fixed;"
 
+
|- valign="top"
<pre>
+
|<div style="margin-right:{{{2|20px}}};"></includeonly><noinclude>
{{MultiCol}}
+
{{template doc}}
This text appears in the first column.
+
{{ColBreak}}
+
This text appears in the second column.
+
{{ColBreak}}
+
This text appears in the third column.
+
{{EndMultiCol}}
+
</pre>
+
 
+
This template has one optional parameter: The width of the table used to implement the columns.  This can be an absolute value (e.g., <tt>12cm</tt>) or a percentage of the page width (e.g., <tt>50%</tt>).  This parameter defaults to <tt>100%</tt>.  For example, to create a multi-column section of a page that is only 50% the width of the page, do this:
+
 
+
<pre>
+
{{MultiCol|50%}}
+
This text appears in the first column.
+
{{ColBreak}}
+
This text appears in the second column.
+
{{ColBreak}}
+
This text appears in the third column.
+
{{EndMultiCol}}
+
</pre>
+
 
+
The multi-column region is always positioned on the left of the page.  To change this, place the above Wikitext in a <tt>[[DIV (HTML tag)|DIV]]</tt> block that has the [[Cascading Style Sheet|CSS]] attribute <tt>text-align</tt> set to either <tt>center</tt> or <tt>right</tt>.
+
 
</noinclude>
 
</noinclude>
{| width="{{{1|100%}}}" border="0" cellspacing="0" cellpadding="0" style="background-color: {{{2|transparent}}}; text-color: {{{3|black}}}"
 
| valign="top" width="1*" |
 
<div style="margin-right: 15px">
 

Latest revision as of 13:23, 21 November 2012

{{#ifeq: Multicol | sandbox

|
Template:Template sandbox notice }}Template:Template other
{{#ifeq: ¬ |

|

|
{{
 #if: 
 | 
 | 
   {{
   #if: {{#ifexist: 
   {{#if: 
   |    
   | {{#switch: Template
 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc

   }}
 | yes
 }}
   | [[[{{#if: 
 | 
 | {{#switch: Template
 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc

 }}|view]]] [[{{fullurl:{{#if: 
 | 
 | {{#switch: Template
 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc

 }}|action=edit}} edit]] [[{{fullurl:{{#if: 
 | 
 | {{#switch: Template
 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc

 }}|action=history}} history]] [purge] 
   | 
     [[{{fullurl:{{#if: 
 | 
 | {{#switch: Template
 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc

 }}| action=edit&preload={{
       #if:  
       | 
       | {{#ifeq: Template | File
         | Template:Documentation/preload-filespace
         | Template:Documentation/preload
         }} }} }} create]]
   }}
 }} {{#switch: ¬
 | ¬ =   
   {{#switch: Template 
   | Template = 50px Template documentation
   | File = Summary
   | #default = Documentation
   }}
 | #default = 
   ¬
}}

}} {{#switch: {{#if:|1|0}}{{#if:|1|0}}{{#ifexist:|1|0}}{{#ifexist:{{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc|1|0}} | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 = | 0110 | 0111 = {{ {{{1}}} }} | 0001 | 0011 = {{ {{#switch: Template

 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc }} | 0000 | 0100 | 0010 | 0101 = }}

{{#if:
 {{#ifeq:  | off
 |
 | {{#ifexist: 
   {{#if: 
   |    
   | {{#switch: Template
 | 
 | File
 | MediaWiki
 | Category = Template talk
 | #default = Template

}}:{{#switch: Multicol | sandbox | testcases = Multicol | #default = Multicol }}/doc

   }}
 | yes
 }}{{
   #switch: Template
   | User
   | Template = yes
   }}
 }}
| {{#ifeq:none|none | | }} {{#if: |

}}

{{#switch:

| | warning | editnotice | system =

| #default =
This message box is using an invalid "type=" parameter and needs fixing.
[[Category:Wikipedia message box parameter needs fixing|Template:Main otherTemplate:Multicol]]

}} }}{{#if:

 {{#switch: Multicol
 | doc
 | testcases = strange
 }}

| [[Category:Wikipedia pages with strange ((documentation)) usage|Template:Main otherTemplate:Multicol]]

}}