Template:Doc example
Example
{{{1}}}
This template uses TemplateStyles: |
Usage
editTemplate to demarcate examples in documentation
- content or 1: The example content
- title: example title, optional, blank if not given
- pre_title: title prefix, optional, default is "Example"
- collapsed:
yes
collapses the box by default. Optional, default false. - margin-left: left margin for indenting on talk pages, etc. Optional, default
1.5em
.
{{doc example |<pre>{{lorem ipsum}}</pre> {{lorem ipsum}} }}
Example
{{lorem ipsum}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
{{doc example | title = Title of the example | pre_title = Prefix | collapsed = yes |<pre>{{lorem ipsum}}</pre> {{lorem ipsum}} }}
Prefix: Title of the example
{{lorem ipsum}}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
See also
edit- Users of {{collapsible box}}:
- {{doc example}}: uses this template for documentation examples
- {{closed}}: uses this template for closed discussions
- {{collapsed section}}: uses this to hide sections of books and other texts.
- {{Advertisements}}
- {{Front matter}}
- {{license container begin}} and {{license container end}}
Example block used in documentation
Parameter | Description | Type | Status | |
---|---|---|---|---|
content | content 1 | The example content | Content | required |
title | title | Title of the example | Unknown | optional |
pre_title | pre_title | no description | Unknown | optional |
margin-left | margin-left | Manual left margin (for indenting on talk pages)
| Line | optional |
collapsed | collapsed | Auto-collapse this example
| Boolean | optional |