Jump to content

Template:Flatlist/doc: Difference between revisions

From The Austrian Economics Wiki, the global repository of classical-liberal thought
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]..."
 
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===
Starts a horizontal list, such as:
{{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}}.


Syntax:
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]]
{{endflatlist}}
}}
</nowiki></pre>
</nowiki></pre>


Alternative syntax:
<pre><nowiki>
{{flatlist |
{{flatlist |
*[[cat]]
* [[cat]]
*[[dog]]
* [[dog]]
*[[horse]]
* [[horse]]
*[[cow]]
* [[cow]]
*[[sheep]]
* [[sheep]]
*[[pig]]
* [[pig]]
}}
}}
</nowiki></pre>
Syntax for ordered lists:


;Alternative syntax:
<pre><nowiki>
<pre><nowiki>
{{flatlist}}
{{flatlist}}
#[[first]]
* [[cat]]
#[[second]]
* [[dog]]
#[[third]]
* [[horse]]
#[[fourth]]
* [[cow]]
#[[fifth]]
* [[sheep]]
#[[sixth]]
* [[pig]]
{{endflatlist}}
{{endflatlist}}
</nowiki></pre>
</nowiki></pre>
===Optional parameters===
* ''style'', additional CSS style options. Example: ''style = border:solid 1px silver; background:lightyellow'' (complex styles should not be used in articles but may be acceptable on user, project and talk pages)
* ''indent'', add left indent by a number of em-spaces, particularly handy for inclusion in an indented discussion thread. Example: ''indent = 2''
=== Examples ===
This template is particularly suitable for use in prose. For an equivalent template to use in Navboxes, see {{tl|Flatlist compact}}
'''Flatlist:'''
{{Flatlist |
*[[cat]]
*[[dog]]
*[[horse]]
*[[cow]]
*[[sheep]]
*[[pig]]
}}
{{Flatlist |
*[[kitten]]
*[[puppy]]
*[[foal]]
*[[calf]]
*[[lamb]]
*[[piglet]]
}}


{{flatlist}}
{{flatlist}}
#[[first]]
* [[cat]]
#[[second]]
* [[dog]]
#[[third]]
* [[horse]]
#[[fourth]]
* [[cow]]
#[[fifth]]
* [[sheep]]
#[[sixth]]
* [[pig]]
{{endflatlist}}
{{endflatlist}}


'''Flatlist compact:'''
;Syntax for ordered lists:
{{Flatlist compact |
<pre><nowiki>
*[[cat]]
{{flatlist | class=hnum |
*[[dog]]
# [[first]]
*[[horse]]
# [[second]]
*[[cow]]
# [[third]]
*[[sheep]]
# [[fourth]]
*[[pig]]
# [[fifth]]
# [[sixth]]
}}
}}
</nowiki></pre>


{{flatlist compact |
{{flatlist | class=hnum |
*[[kitten]]
# [[first]]
*[[puppy]]
# [[second]]
*[[foal]]
# [[third]]
*[[calf]]
# [[fourth]]
*[[lamb]]
# [[fifth]]
*[[piglet]]
# [[sixth]]
}}
}}


{{flatlist compact}}
===Parameters===
#[[first]]
* '''class''' – adds a CSS class to the containing div.
#[[second]]
* '''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.
#[[third]]
::Example: {{para|<var>style</var>|<var>border:solid 1px silver; background:lightyellow</var>}}
#[[fourth]]
* '''indent''' – indents the list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.
#[[fifth]]
::Example: {{para|<var>indent</var>|<var>2</var>}}
#[[sixth]]
{{endflatlist}}


=== 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|multi-column numbered list}}
* {{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|{{PAGENAME}}]]
[[Category:Typing-aid templates]]
[[Category:MisesWiki list formatting templates|{{PAGENAME}}]]
[[Category:MisesWiki list formatting templates]]


</includeonly>
}}</includeonly>

Latest revision as of 17:21, 25 July 2012

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
  • 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

See also