Jump to content

Template:FixBunching: Difference between revisions

From IdeaWazaWiki
wikademia>BenB4
m fmt
wikademia>BenB4
test includeonly fix
Line 1: Line 1:
{{#switch:{{{1|}}}
<includeonly>{{#switch:{{{1|}}}
|beg|Beg|BEG|begin|Begin|BEGIN=<!--
|beg|Beg|BEG|begin|Begin|BEGIN=<!--
  --><includeonly>{{{!}}style="float:{{#if:{{{left|}}}|left|right}}; <!--
  -->{{{!}}style="float:{{#if:{{{left|}}}|left|right}}; <!--
  -->margin:{{#if:{{{left|}}}<!--
  -->margin:{{#if:{{{left|}}}<!--
  === -->|{{{margin| .25 .25 .25 0}}}<!--
  === -->|{{{margin| .25 .25 .25 0}}}<!--
Line 11: Line 11:
  -->}}; "
  -->}}; "
{{!}}<!--This line confines right floating elements in a table, the newline here is necessary after this comment -->
{{!}}<!--This line confines right floating elements in a table, the newline here is necessary after this comment -->
</includeonly><noinclude><br>table initialization</noinclude>


|mid|Mid|MID|Middle|MIDDLE=<!--
|mid|Mid|MID|Middle|MIDDLE=<!--
  --><includeonly>{{!}}-  
  -->{{!}}-  


{{!}}<!-- this trailing newline needed.  
{{!}}<!-- this trailing newline needed.  
  ---      This line separates elements into the next table cell down
  ---      This line separates elements into the next table cell down
  -->
  -->
</includeonly><noinclude><br>table row break</noinclude>
|end|End|END=<!--
|end|End|END=<!--
  --><includeonly>{{!}}}
  -->{{!}}}
   
   
<!-- above newline needed
<!-- above newline needed


This line separates terminates the table cell
This line separates terminates the table cell
  --></includeonly><noinclude><br>table end element</noinclude>
  -->
|#default=<font color="red"><big>Parameter not given Error...</big></font><br />''Template {{tl2|fixHTML}} (generator) needs <code> '''<nowiki>{{{1}}}</nowiki> ''defined''''' </code> as one of: {The sets: '''<nowiki>|beg|Beg|BEG</nowiki>''' or '''<nowiki>|mid|Mid|MID</nowiki>''' or '''<nowiki>|end|End|END</nowiki>''' }.
|#default=<font color="red"><big>Parameter not given Error...</big></font><br />''Template {{tl2|fixHTML}} (generator) needs <code> '''<nowiki>{{{1}}}</nowiki> ''defined''''' </code> as one of: {The sets: '''<nowiki>|beg|Beg|BEG</nowiki>''' or '''<nowiki>|mid|Mid|MID</nowiki>''' or '''<nowiki>|end|End|END</nowiki>''' }.
}}<noinclude><br><hr><small><center><div style="width:50%; border:1px solid; float:center; clear:both; ">The above error message is generated because this template page has no <code> '''<nowiki>{{{1}}}</nowiki> ''defined''''' </code>, and it uses a parser function switch to combine all formatting needs into this one template.</div></center></small>
}}</includeonly><noinclude>
 
;See {{wpd|Wikipedia:How to fix bunched-up edit links}}
;See {{wpd|Wikipedia:How to fix bunched-up edit links}}



Revision as of 14:46, 8 August 2007

See Template:Wpd
This template is used to make right floating elements behave with others on the right margin.
  • It will take an optional parameter 'left', which if defined (e.g. "|left=1|beg") will float the enclosed elements left instead of the normal right.
  • Procedure is easy as 1, 2, 3...
    1. Place {{FixHTML|beg}} above the top image, infobox or other right floating HTML element.
    2. Place {{FixHTML|mid}} above the next image, infobox or other right floating HTML element. And the next ... And the next ... And the next ... And the next, as needed.
    3. Place {{FixHTML|end}} BELOW the last (Bottom) image, infobox or other right floating HTML element.
Example using Miltary Info boxes
{{FixHTML|begin}}
{{Military conflict infobox
| ... (contents)
}}
{{FixHTML|mid}}
{{Military campaign infobox
| ... (contents)
}}
{{FixHTML|mid}}
[[Image:Boy give finger to Kaiser.png|...]]
{{FixHTML|mid}}
[[Image:Kaiser Moons boy.png|...]
{{FixHTML|end}}

Similar templates at English sister projects [edit]
wpd Wikipedia FixBunching
cms Commons FixBunching
wbk Wikibooks FixBunching
wnw Wikinews FixBunching
wsp Wikispecies FixBunching
wvy Wikiversity FixBunching