Template:INITOC: Difference between revisions

From Step Mods | Change The Game
mNo edit summary
No edit summary
Line 1: Line 1:
<includeonly><h3>INI Parameters by Section</h3><div style="padding:12px 12px; border:{{{borderSize|1px}}} solid {{{borderColor|#555}}}; width:{{{width|65%}}}; -webkit-column-count:{{{columns|3}}}; -moz-column-count:{{{columns|3}}}; column-count:{{{columns|3}}}; -webkit-column-gap:{{{gapSize|25px}}}; -moz-column-gap:{{{gapSize|25px}}}; column-gap:{{{gapSize|25px}}}; -webkit-column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}}; -moz-column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}}; column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}};">{{{text|}}}</div></includeonly><noinclude>__NOTOC__
<includeonly>{{#if:{{{notitle|}}}||<h3>INI Parameters by Section</h3>}}<div style="padding:12px 12px; border:{{{borderSize|1px}}} solid {{{borderColor|#555}}}; width:{{{width|65%}}}; -webkit-column-count:{{{columns|3}}}; -moz-column-count:{{{columns|3}}}; column-count:{{{columns|3}}}; -webkit-column-gap:{{{gapSize|25px}}}; -moz-column-gap:{{{gapSize|25px}}}; column-gap:{{{gapSize|25px}}}; -webkit-column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}}; -moz-column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}}; column-rule:{{{borderSize|0px}}} solid {{{borderColor|#555}}};">{{{text|}}}</div></includeonly><noinclude>__NOTOC__
== Purpose & Usage ==
== Purpose & Usage ==
This template should be used in conjunction with the helper template, {{tl|INISectionLabel}}. This template provides a method for laying out a custom table of contents listing subpage links to respective INI parameters. These subpage links are, in turn, handled using {{tl|INISectionLabel}}.
This template should be used in conjunction with the helper template, {{tl|INISectionLabel}}. This template provides a method for laying out a custom table of contents listing subpage links to respective INI parameters. These subpage links are, in turn, handled using {{tl|INISectionLabel}}.
Line 13: Line 13:
*''gapSize'': Sets the whitespace width between columns (analogous to padding). Enter an integer in pixels. Default is 25px.
*''gapSize'': Sets the whitespace width between columns (analogous to padding). Enter an integer in pixels. Default is 25px.
*''borderSize'': Sets the border width between columns (placed in center of the gap). Enter an integer in pixels. Default is 1px.
*''borderSize'': Sets the border width between columns (placed in center of the gap). Enter an integer in pixels. Default is 1px.
*''notitle''" Omits the default h3 title for the TOC box.


== Examples ==
== Examples ==
Line 42: Line 43:


'''Code:''' (can be used without helper template)
'''Code:''' (can be used without helper template)
<pre>{{INIColumns|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9}</pre>
<pre>
{{INIColumns
|notitle
|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9}</pre>
'''Result:'''
'''Result:'''
{{INIColumns|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9}}
{{INIColumns
|notitle
|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9}}


== See Also ==
== See Also ==
*[[Template:INISectionLabel]]
*[[Template:INISectionLabel]]
</noinclude>
</noinclude>

Revision as of 18:34, July 1, 2015

Purpose & Usage

This template should be used in conjunction with the helper template, Template:Tl. This template provides a method for laying out a custom table of contents listing subpage links to respective INI parameters. These subpage links are, in turn, handled using Template:Tl.

Parameters

Required

  • text: List of Template:Tl helper template calls (no breaks or spaces in between). If for some reason this is used with out the helper template, enter parameter-heading labels separated by <br /> or <br> HTML tags.

Optional

  • borderColor: Sets the color of the borders. Enter the hex code (excluding # prefix) Default is #555.
  • width: Sets the width of the entire block of columned content. Enter an integer in pixels. Default is 65%.
  • columns: Sets the number of columns to use. Enter an integer. Default is 3.
  • gapSize: Sets the whitespace width between columns (analogous to padding). Enter an integer in pixels. Default is 25px.
  • borderSize: Sets the border width between columns (placed in center of the gap). Enter an integer in pixels. Default is 1px.
  • notitle" Omits the default h3 title for the TOC box.

Examples

Code: (normal use with the helper template)

{{INIColumns|text={{INISectionLabel|ParamHead1}}{{INISectionLabel|ParamHead2}}{{INISectionLabel|ParamHead3}}{{INISectionLabel|ParamHead4}}{{INISectionLabel|ParamHead5}}{{INISectionLabel|ParamHead6}}{{INISectionLabel|ParamHead7}}{{INISectionLabel|ParamHead8}}{{INISectionLabel|ParamHead9}}{{INISectionLabel|ParamHead10}}{{INISectionLabel|ParamHead11}}{{INISectionLabel|ParamHead12}}
}}

Result: Template:INIColumns

Code: (

{{INIColumns
|borderColor=#55aa55
|borderSize=1px
|columns=4
|width=90%
|gapSize=10px
|text={{INISectionLabel|ParamHead1}}{{INISectionLabel|ParamHead2}}{{INISectionLabel|ParamHead3}}{{INISectionLabel|ParamHead4}}{{INISectionLabel|ParamHead5}}{{INISectionLabel|ParamHead6}}{{INISectionLabel|ParamHead7}}{{INISectionLabel|ParamHead8}}{{INISectionLabel|ParamHead9}}{{INISectionLabel|ParamHead10}}{{INISectionLabel|ParamHead11}}{{INISectionLabel|ParamHead12}}{{INISectionLabel|ParamHead13}}{{INISectionLabel|ParamHead14}}{{INISectionLabel|ParamHead15}}{{INISectionLabel|ParamHead16}}{{INISectionLabel|ParamHead17}}{{INISectionLabel|ParamHead18}}{{INISectionLabel|ParamHead19}}{{INISectionLabel|ParamHead20}}
}}

Result: Template:INIColumns

Code: (can be used without helper template)

{{INIColumns
|notitle
|text=ParamHead1<br />ParamHead2<br />ParamHead3<br />ParamHead4<br />ParamHead5<br />ParamHead6<br />ParamHead7<br />ParamHead8<br />ParamHead9}

Result: Template:INIColumns

See Also