Template:Sbs: Difference between revisions

From ReformedWiki.org, the wiki for Reformed Christianity
Maury (talk | contribs)
No edit summary
Maury (talk | contribs)
Tag: Manual revert
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}||<span class="error">You must enter at least 1 field of text.</span>}}<table style="width:{{{width|100}}}%; border:1px solid #aaa; background-color:#f9f9f9; border-collapse:collapse;">
<includeonly>{{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}||<span class="error">You must enter at least 1 field of text.</span>}}<table style="width:{{{width|100}}}%; border:1px solid #aaa; background-color:#f9f9f9; border-collapse:collapse;">
{{#if:{{{title|}}}|<tr><th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">Column 1</th><th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">Column 2</th>{{#if:{{{3|}}}|<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">Column 3</th>}}{{#if:{{{4|}}}|<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">Column 4</th>}}{{#if:{{{5|}}}|<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">Column 5</th>}}</tr>|}}
{{#if:{{{title|}}}|<tr>
<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">{{{t1|Column 1}}}</th>
<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">{{{t2|Column 2}}}</th>
{{#if:{{{3|}}}|<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">{{{t3|Column 3}}}</th>}}
{{#if:{{{4|}}}|<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">{{{t4|Column 4}}}</th>}}
{{#if:{{{5|}}}|<th style="border:1px solid #aaa; padding:5px; background-color:#ddd; text-align:center;">{{{t5|Column 5}}}</th>}}
</tr>}}
<tr>
<tr>
<td style="border:1px solid #aaa; padding:8px; vertical-align:top; width:{{#if:{{{3|}}}|{{#if:{{{4|}}}|{{#if:{{{5|}}}|20%|25%}}|33%}}|50%}};">{{{1|}}}</td>
<td style="border:1px solid #aaa; padding:8px; vertical-align:top; width:{{#if:{{{5|}}}|20%|{{#if:{{{4|}}}|25%|{{#if:{{{3|}}}|33%|50%}}}}}};">{{{1|}}}</td>
<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{2|}}}</td>
<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{2|}}}</td>
{{#if:{{{3|}}}|<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{3}}}</td>}}
{{#if:{{{3|}}}|<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{3|}}}</td>}}
{{#if:{{{4|}}}|<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{4}}}</td>}}
{{#if:{{{4|}}}|<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{4|}}}</td>}}
{{#if:{{{5|}}}|<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{5}}}</td>}}
{{#if:{{{5|}}}|<td style="border:1px solid #aaa; padding:8px; vertical-align:top;">{{{5|}}}</td>}}
</tr></table>{{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|{{#if:{{{nb|{{{title|}}}}}}||<br />}}|}}</includeonly><noinclude>
</tr></table>{{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|{{#if:{{{nb|}}}||<br />}}}}</includeonly><noinclude>
==Usage==
== Template Documentation ==
Use this template to create side-by-side text comparisons or multi-column layouts.
 
'''Basic (2 columns):'''
'''Basic (2 columns):'''
<pre>{{sbs|Left text|Right text}}</pre>
<pre>{{sbs|Left text|Right text}}</pre>
'''With titles:'''
'''With titles:'''
<pre>{{sbs|title=1|1=Left text|2=Right text}}</pre>
<pre>{{sbs|title=1|1=Left text|2=Right text}}</pre>
'''Custom Titles:'''
To rename the headers, use <code>t1=</code>, <code>t2=</code>, etc.
<pre>{{sbs|title=1|t1=Anything|t2=Something Else|1=Left text|2=Right text}}</pre>
'''Up to 5 columns:'''
'''Up to 5 columns:'''
<pre>{{sbs|1=Text|2=Text|3=Text|4=Text|5=Text}}</pre>
<pre>{{sbs|1=Text|2=Text|3=Text|4=Text|5=Text}}</pre>
'''Note:''' If your text contains an <code>=</code> sign, you must use named parameters:
 
'''Note:''' If your text contains an <code>=</code> sign, you '''must''' use named parameters (1=, 2=, etc.):
<pre>{{sbs|1=Text with = sign|2=Other text}}</pre>
<pre>{{sbs|1=Text with = sign|2=Other text}}</pre>
</noinclude>
</noinclude>

Latest revision as of 00:27, 20 April 2026

Template Documentation

Use this template to create side-by-side text comparisons or multi-column layouts.

Basic (2 columns):

{{sbs|Left text|Right text}}

With titles:

{{sbs|title=1|1=Left text|2=Right text}}

Custom Titles: To rename the headers, use t1=, t2=, etc.

{{sbs|title=1|t1=Anything|t2=Something Else|1=Left text|2=Right text}}

Up to 5 columns:

{{sbs|1=Text|2=Text|3=Text|4=Text|5=Text}}

Note: If your text contains an = sign, you must use named parameters (1=, 2=, etc.):

{{sbs|1=Text with = sign|2=Other text}}