Difference between revisions of "Template:Infobox number/box"

From blackwiki
Jump to navigation Jump to search
imported>R'n'B
m (one more test)
imported>R'n'B
(revert; I can't get this to work, so will just have to deal with incorrect links for now)
Line 5: Line 5:
 
   | {{{number}}}
 
   | {{{number}}}
 
   | <table style= "width:100%; margin:0"><tr>
 
   | <table style= "width:100%; margin:0"><tr>
<td style= "width:15%; text-align:left; white-space: nowrap; font-size:smaller">{{Infobox number/link|pre=&#8592;|number = {{#expr:{{{number}}} - 1 }} | {{#if:{{{prev-nolink|}}}|plain{{=}}yes|}} }}</td>
+
<td style= "width:15%; text-align:left; white-space: nowrap; font-size:smaller">{{Infobox number/link|pre=&#8592;|number = {{#expr:{{{number}}} - 1 }} }}</td>
 
<td style= "width:70%; padding-left:1em; padding-right:1em; text-align: center;">{{Infobox number/link|plain=yes|number={{{number}}}}}</td>
 
<td style= "width:70%; padding-left:1em; padding-right:1em; text-align: center;">{{Infobox number/link|plain=yes|number={{{number}}}}}</td>
<td style= "width:15%; text-align:right; white-space: nowrap; font-size:smaller">{{Infobox number/link|post=&#8594;|number = {{#expr:{{{number}}} + 1 }} | {{#if:{{{next-nolink|}}}|plain{{=}}yes|}} }}</td>
+
<td style= "width:15%; text-align:right; white-space: nowrap; font-size:smaller">{{Infobox number/link|post=&#8594;|number = {{#expr:{{{number}}} + 1 }} }}</td>
 
</tr></table>
 
</tr></table>
 
   }}
 
   }}

Revision as of 14:37, 19 September 2018

50px Template documentation

This subtemplate is used to generate the infobox for {{infobox number}}. By using a subtemplate, it reduces the repetition in the code by using a single computation of the value for |number= by {{infobox number}}, which is passed to this subtemplate. This subtemplate should by used only by {{infobox number}}, and not used directly.