Template:Flatlist/doc: Difference between revisions
Appearance
John James (talk | contribs) Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> === Usage === Starts a horizontal list, such as: {{flatlist}} *cat *[[dog]..." |
John James (talk | contribs) update |
||
| Line 2: | Line 2: | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
=== Usage === | ===Usage=== | ||
{{tl|Flatlist}} starts a horizontal list, such as: | |||
{{flatlist}} | {{flatlist}} | ||
*[[cat]] | * [[cat]] | ||
*[[dog]] | * [[dog]] | ||
*[[horse]] | * [[horse]] | ||
*[[cow]] | * [[cow]] | ||
*[[sheep]] | * [[sheep]] | ||
*[[pig]] | * [[pig]] | ||
{{endflatlist}} | {{endflatlist}} | ||
The bottom margin is inherited from the current container. Normally this will be 0.5em. | The bottom margin is inherited from the current container. Normally this will be 0.5em. This template can be used with or without {{tl|endflatlist}}. | ||
For navigation boxes using {{tl|navbox}}, one can set {{para|listclass|hlist}}, and achieve the same styling without using this template. | |||
===Examples=== | |||
<pre><nowiki> | <pre><nowiki> | ||
{{flatlist | {{flatlist | | ||
*[[cat]] | * [[cat]] | ||
*[[dog]] | * [[dog]] | ||
*[[horse]] | * [[horse]] | ||
*[[cow]] | * [[cow]] | ||
*[[sheep]] | * [[sheep]] | ||
*[[pig]] | * [[pig]] | ||
}} | |||
</nowiki></pre> | </nowiki></pre> | ||
{{flatlist | | {{flatlist | | ||
*[[cat]] | * [[cat]] | ||
*[[dog]] | * [[dog]] | ||
*[[horse]] | * [[horse]] | ||
*[[cow]] | * [[cow]] | ||
*[[sheep]] | * [[sheep]] | ||
*[[pig]] | * [[pig]] | ||
}} | }} | ||
;Alternative syntax: | |||
<pre><nowiki> | <pre><nowiki> | ||
{{flatlist}} | {{flatlist}} | ||
* [[cat]] | |||
* [[dog]] | |||
* [[horse]] | |||
* [[cow]] | |||
* [[sheep]] | |||
* [[pig]] | |||
{{endflatlist}} | {{endflatlist}} | ||
</nowiki></pre> | </nowiki></pre> | ||
{{flatlist}} | {{flatlist}} | ||
* [[cat]] | |||
* [[dog]] | |||
* [[horse]] | |||
* [[cow]] | |||
* [[sheep]] | |||
* [[pig]] | |||
{{endflatlist}} | {{endflatlist}} | ||
;Syntax for ordered lists: | |||
{{ | <pre><nowiki> | ||
{{flatlist | class=hnum | | |||
# [[first]] | |||
# [[second]] | |||
# [[third]] | |||
# [[fourth]] | |||
# [[fifth]] | |||
# [[sixth]] | |||
}} | }} | ||
</nowiki></pre> | |||
{{flatlist | {{flatlist | class=hnum | | ||
# [[first]] | |||
# [[second]] | |||
# [[third]] | |||
# [[fourth]] | |||
# [[fifth]] | |||
# [[sixth]] | |||
}} | }} | ||
===Parameters=== | |||
* '''class''' – adds a CSS class to the containing div. | |||
* '''style''' – adds CSS style options. Complex styles should not be used in articles (per [[w:wp:deviations]]) but may be acceptable on user, project, and talk pages. | |||
::Example: {{para|<var>style</var>|<var>border:solid 1px silver; background:lightyellow</var>}} | |||
* '''indent''' – indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread. | |||
::Example: {{para|<var>indent</var>|<var>2</var>}} | |||
{{ | |||
=== See also === | ===See also=== | ||
* {{tl|endflatlist}} | * {{tl|endflatlist}} | ||
* {{tl|plainlist}} | |||
* {{tl|multi-column numbered list}} | |||
* {{tl|nowrap begin}}/{{tl|nowrap end}} | * {{tl|nowrap begin}}/{{tl|nowrap end}} | ||
* {{tl|pagelist}} | * {{tl|pagelist}} | ||
* [[w:WP:HLIST]] | |||
<includeonly> | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| | ||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
[[Category:Typing-aid templates | [[Category:Typing-aid templates]] | ||
[[Category:MisesWiki list formatting templates | [[Category:MisesWiki list formatting templates]] | ||
</includeonly> | }}</includeonly> | ||
Latest revision as of 17:21, 25 July 2012
| This is a documentation subpage for Template:Flatlist. It contains usage information, categories and other content that is not part of the original template page. |
Usage
{{Flatlist}} starts a horizontal list, such as:
The bottom margin is inherited from the current container. Normally this will be 0.5em. This template can be used with or without {{endflatlist}}.
For navigation boxes using {{navbox}}, one can set |listclass=hlist, and achieve the same styling without using this template.
Examples
{{flatlist |
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
- Alternative syntax
{{flatlist}}
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
{{endflatlist}}
- Syntax for ordered lists
{{flatlist | class=hnum |
# [[first]]
# [[second]]
# [[third]]
# [[fourth]]
# [[fifth]]
# [[sixth]]
}}
Parameters
- class – adds a CSS class to the containing div.
- style – adds CSS style options. Complex styles should not be used in articles (per w:wp:deviations) but may be acceptable on user, project, and talk pages.
- Example:
|style=border:solid 1px silver; background:lightyellow
- Example:
- indent – indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.
- Example:
|indent=2
- Example:
See also
- {{endflatlist}}
- {{plainlist}}
- {{multi-column numbered list}}
- {{nowrap begin}}/{{nowrap end}}
- {{pagelist}}
- w:WP:HLIST