Template:Block indent: Difference between revisions
(Created page with "<noinclude> This provide a block indent, similar to the Wikipedia template ([https://en.wikipedia.org/wiki/Template:Block_indent Block indent]). Usage: <pre style="max-width:305px; margin-left:25px;"><nowiki> {{Block indent|<Text string>}} </nowiki></pre> Category:Template </noinclude><includeonly><div style="padding-left:3em; padding-right:0; overflow:hidden;">{{{1|}}}</div></includeonly>") |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This provide a block indent, similar to the Wikipedia template ([https://en.wikipedia.org/wiki/Template:Block_indent Block indent]). | This provide a block indent, similar to the Wikipedia template ([https://en.wikipedia.org/wiki/Template:Block_indent Block indent]). The first parameter is the content that should be indented and the second parameter is the number of indents similar to the amount of preceding colons. If no second parameter is present, it defaults to 1 indent. | ||
Usage: | Usage: | ||
<pre style="max-width: | <pre style="max-width:355px; margin-left:12px;"><nowiki> | ||
{{Block indent| | {{Block indent|Test string #1a}} | ||
: Test string #1b | |||
{{Block indent|Test string #2a|2}} | |||
:: Test string #2b | |||
{{Block indent|Test string #3a|5}} | |||
::::: Test string #3b | |||
</nowiki></pre> | </nowiki></pre> | ||
Results in: | |||
{{Block indent|Test string #1a}} | |||
: Test string #1b | |||
{{Block indent|Test string #2a|2}} | |||
:: Test string #2b | |||
{{Block indent|Test string #3a|5}} | |||
::::: Test string #3b | |||
Note, if your text includes an equals sign, you need to explicitly number the 1st parameter. If you explicitly number the 1st parameter, you must also explicitly number the 2nd parameter if you use it: | |||
<pre style="max-width:550px; margin-left:12px;"><nowiki> | |||
{{Block indent|1=This has an equals sign (=) in it.|2=6}} | |||
</nowiki></pre> | |||
Results in: | |||
{{Block indent|1=This has an equals sign (=) in it.|2=6}} | |||
Otherwise it would (when written like this: <code><nowiki>{{Block indent|This has an equals sign (=) in it.|6}}</nowiki><code>), result in: | |||
{{Block indent|This has an equals sign (=) in it.|6}} | |||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude><includeonly><div style="padding-left: | </noinclude><includeonly><div style="padding-left:{{#switch: {{{2|}}} | 1 = 1.6em | 2 = 3.2em | 3 = 4.8em | 4 = 6.4em | 5 = 8.0em | #default = 1.6em}}; padding-right:0; overflow:hidden;">{{{1|}}}</div></includeonly> |
Latest revision as of 16:54, 21 July 2025
This provide a block indent, similar to the Wikipedia template (Block indent). The first parameter is the content that should be indented and the second parameter is the number of indents similar to the amount of preceding colons. If no second parameter is present, it defaults to 1 indent.
Usage:
{{Block indent|Test string #1a}} : Test string #1b {{Block indent|Test string #2a|2}} :: Test string #2b {{Block indent|Test string #3a|5}} ::::: Test string #3b
Results in:
- Test string #1b
- Test string #2b
- Test string #3b
Note, if your text includes an equals sign, you need to explicitly number the 1st parameter. If you explicitly number the 1st parameter, you must also explicitly number the 2nd parameter if you use it:
{{Block indent|1=This has an equals sign (=) in it.|2=6}}
Results in:
Otherwise it would (when written like this: {{Block indent|This has an equals sign (=) in it.|6}}
), result in: