Difference between revisions of "Template:Flatlist/doc"

From Recidemia
Jump to: navigation, search
m (recat)
 
m (es-iw)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
=== Usage ===
+
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
Starts a horizontal list, which will appear like this:
 
  
 +
===Usage===
 +
{{tl|Flatlist}} starts a horizontal list, such as:
 
{{flatlist}}
 
{{flatlist}}
*[[Cookbook:Appetizers|Appetizers]]
+
* [[cat]]
*[[Cookbook:Beverages|Beverages]]
+
* [[dog]]
*[[Cookbook:Bread Recipes|Bread]]
+
* [[horse]]
*[[Cookbook:Breakfast Recipes|Breakfast]]
+
* [[cow]]
*[[Cookbook:Confections|Confections]]
+
* [[sheep]]
*[[Cookbook:Dessert|Desserts]]
+
* [[pig]]
*[[Cookbook:Meat Recipes|Meats]]
 
*[[Cookbook:Pasta Recipes|Pasta]]
 
*[[Cookbook:Rice Recipes|Rice]]
 
*[[Cookbook:Salad Recipes|Salads]]
 
 
{{endflatlist}}
 
{{endflatlist}}
 +
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>
 +
{{flatlist |
 +
* [[cat]]
 +
* [[dog]]
 +
* [[horse]]
 +
* [[cow]]
 +
* [[sheep]]
 +
* [[pig]]
 +
}}
 +
</nowiki></pre>
 +
 
 +
{{flatlist |
 +
* [[cat]]
 +
* [[dog]]
 +
* [[horse]]
 +
* [[cow]]
 +
* [[sheep]]
 +
* [[pig]]
 +
}}
 +
 
 +
;Alternative syntax:
 +
<pre><nowiki>
 +
{{flatlist}}
 +
* [[cat]]
 +
* [[dog]]
 +
* [[horse]]
 +
* [[cow]]
 +
* [[sheep]]
 +
* [[pig]]
 +
{{endflatlist}}
 +
</nowiki></pre>
  
<pre>
 
 
{{flatlist}}
 
{{flatlist}}
*[[Cookbook:Appetizers|Appetizers]]
+
* [[cat]]
*[[Cookbook:Beverages|Beverages]]
+
* [[dog]]
*[[Cookbook:Bread Recipes|Bread]]
+
* [[horse]]
*[[Cookbook:Breakfast Recipes|Breakfast]]
+
* [[cow]]
*[[Cookbook:Confections|Confections]]
+
* [[sheep]]
*[[Cookbook:Dessert|Desserts]]
+
* [[pig]]
*[[Cookbook:Meat Recipes|Meats]]
 
*[[Cookbook:Pasta Recipes|Pasta]]
 
*[[Cookbook:Rice Recipes|Rice]]
 
*[[Cookbook:Salad Recipes|Salads]]
 
 
{{endflatlist}}
 
{{endflatlist}}
</pre>
 
  
=== See also ===
+
;Syntax for ordered lists:
{{tl|endflatlist}}
+
<pre><nowiki>
<includeonly>
+
{{flatlist | class=hnum |
 +
# [[first]]
 +
# [[second]]
 +
# [[third]]
 +
# [[fourth]]
 +
# [[fifth]]
 +
# [[sixth]]
 +
}}
 +
</nowiki></pre>
 +
 
 +
{{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 [[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===
 +
* {{tl|endflatlist}}
 +
* {{tl|plainlist}}
 +
* {{tl|multi-column numbered list}}
 +
* {{tl|nowrap begin}}/{{tl|nowrap end}}
 +
* {{tl|pagelist}}
 +
* [[WP:HLIST]]
 +
 
 +
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Typing-aid templates|{{PAGENAME}}]]
+
[[Category:Typing-aid templates]]
</includeonly>
+
[[Category:Wikipedia list formatting templates]]
 +
 
 +
[[as:Template:Flat list]]
 +
[[fr:Modèle:Liste éléments]]
 +
[[es:Plantilla:Lista plana]]
 +
[[hi:साँचा:Flatlist]]
 +
[[id:Templat:Flatlist]]
 +
[[ko:틀:Flatlist]]
 +
[[ja:Template:Flatlist]]
 +
}}</includeonly>

Revision as of 21:06, 15 March 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 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