Template:Clear
{{#ifeq:clear |doc
|
{{#ifeq:show |show
|| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if:|
|{{#ifexist:Template:Clear
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
| Warning | This template is used on approximately 3,740,000 pages, or roughly 269452% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
| File:Information icon4.svg | This template {{#switch:never|may=may be substituted|never=should not be substituted||#default=should always be substituted – use {{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|Template
| template
| other
}}
}}
| template = |no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes }} |Any accidental transclusions will be automatically substituted by a bot.{{#if:{{safesubst:#switch: |no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes}}||{{#switch:Clear|doc|sandbox=|}}}}}} {{#if: |For transcluding, use {{[[Template:|]]}} instead.}} |
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}||{{#switch:Clear|doc|sandbox=|{{#switch:never |never= |may= |#default={{#ifexpr: 0Template:Find page text > 0 | }} }}}}}}
{{#ifeq:Template:Clear|Template:Clear|Description
This template makes content wait until existing content is completed in all columns. It is often used to prevent text from flowing next to unrelated images.
Usage
{{clear}}— adds{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|div|div}}{{#if:style="clear:both;"| style="clear:both;"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:div|!--||>}}
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:div|!--|-->|</div>}}
}}
{{clear|left}}— adds{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|div|div}}{{#if:style="clear:left;"| style="clear:left;"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:div|!--||>}}
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:div|!--|-->|</div>}}
}}
{{clear|right}}— adds{{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:|div|div}}{{#if:style="clear:right;"| style="clear:right;"}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:div|!--||>}}
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:div|!--|-->|</div>}}
}}
For technical details, see the discussion in the talk page.
Examples
Example without {{clear}}
{{safesubst:#if:|Lorem ipsum|Lorem ipsum}} dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididun
New section without the template before
Without the code {{clear}}, this section starts at the right of the image.
Example that uses {{clear}}
{{safesubst:#if:|Lorem ipsum|Lorem ipsum}} dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididun
{{clear}}
New section with the template before
Here the code {{clear}} is placed before this section, so it appears below the image.
TemplateData
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AClear%7CClear%7CClear%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:Clear|Template:Clear|this template}} in articles{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AClear%7CClear%7CClear%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AClear%7CClear%7CClear%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:Clear|Template:Clear|Template:Clear}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}}.
|#default=[1]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}} }}|This is the {{#if:|TemplateData|TemplateData}} for this template used by TemplateWizard, VisualEditor and other tools. {{#switch:
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AClear%7CClear%7CClear%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:Clear|Template:Clear|this template}} in articles{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AClear%7CClear%7CClear%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AClear%7CClear%7CClear%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:Clear|Template:Clear|Template:Clear}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}}.
|#default=[2]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Clear|its|this}} TemplateData}} }}}}
TemplateData for Clear
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|Template
| template
| other
}}
}}
| template = {{safesubst:#if:{{safesubst:#ifeq:Clear|sandbox|1}}{{safesubst:#ifeq:Clear|doc|1}}||
}} | other | #default = }} <templatedata>{ "description": "Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images, so text will appear on a full width line under the image.", "params": { "1": { "label": "Side", "description": "Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.", "type": "line", "required": false, "suggestedvalues": [ "right", "left", "both" ], "default": "both" } }, "format": "inline" }</templatedata>
See also
- {{Clear left}} (implemented using this template)
- {{Clear right}} (implemented using this template)
- {{Clear2}} (derived from this template)
- {{Break}}
- {{Float}}
- {{Stack}}
{{safesubst:#if:{{safesubst:#ifeq:Clear|sandbox|1}}{{safesubst:#ifeq:Clear|doc|1}}|| }}
- Pages with broken file links
- Documentation subpages without corresponding pages
- Wikipedia templates to be automatically substituted
- Wikipedia never-substituted templates
- Wikipedia substituted templates
- Templates with matching hidden id
- Templates using TemplateData
- Line-handling templates
- Wikipedia HTML tag-replacing templates