Kentsmith9 (talk | contribs) (→Full text: Added Collapse template) |
Kentsmith9 (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{documentation subpage}} | {{documentation subpage}} | ||
<!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE---> | <!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE---> | ||
{{Template doc cleanup}} | |||
{{template shortcut|Ipsum|Lipsum|Lorem|Loremipsum}} | {{template shortcut|Ipsum|Lipsum|Lorem|Loremipsum}} | ||
This template outputs the "[https://en.wikipedia.org/wiki/Lorem_ipsum|lorem ipsum]" filler text. It takes four parameters: the number of paragraphs to generate, paragraph prefix, paragraph suffix, and an option to link lorem ipsum. There are 10 distinct paragraphs, but it can produce up to 20 in one use. | This template outputs the "[https://en.wikipedia.org/wiki/Lorem_ipsum|lorem ipsum]" filler text. It takes four parameters: the number of paragraphs to generate, paragraph prefix, paragraph suffix, and an option to link lorem ipsum. There are 10 distinct paragraphs, but it can produce up to 20 in one use. | ||
Line 62: | Line 64: | ||
===Limiting character count to less than one paragraph=== | ===Limiting character count to less than one paragraph=== | ||
If fewer than 446 characters are desired, use {{tl|lorem ipsum | If fewer than 446 characters are desired, use {{tl|lorem ipsum}} and truncate to the desired size with {{tl|Str left}}: | ||
<code><nowiki>{{Str left|{{Lorem ipsum | <code><nowiki>{{Str left|{{Lorem ipsum}}|123}}</nowiki></code> will result in: | ||
{{Str left|{{Lorem ipsum | {{Str left|{{Lorem ipsum}}|123}} | ||
==Full text== | ==Full text== |
Latest revision as of 18:52, 25 August 2022
This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
This page contains one or more broken links likely from an incomplete Wikipedia documentation import. If you edit this page, consider either adding the missing links or update the template code and this documentation to not use any of the missing references. |
This template outputs the "ipsum" filler text. It takes four parameters: the number of paragraphs to generate, paragraph prefix, paragraph suffix, and an option to link lorem ipsum. There are 10 distinct paragraphs, but it can produce up to 20 in one use.
Usage
{{Lorem ipsum}}
– one paragraph
{{Lorem ipsum|3|*}}
– three paragraphs as bullet list
{{Lorem ipsum|10}}
– ten paragraphs
Parameters
There are four positional parameters and two named parameters, all optional:
- 1 – Number of paragraphs to display (1..20; default: 1)
- 2 – prefix character(s) to emit before each paragraph (such as a quotation mark, an asterisk for bullet list, etc.; default: none)
- 3 – suffix (such as ending quote; default: none)
- 4 – if set to
|4=yes
, causes the first two words of paragraph 1 to be linked to ipsum. (default: 'no'. Alias: 'link'.) - join – if set to
|join=yes
, causes all output to be emitted as a single paragraph (default: 'no'). Use of 'join' alters how prefix is handled.
Notes about font styling
For most parameter combinations, this template produces block-level Html output, and for those cases, font styling using wiki markup such as '''bold'''
, ''italic''
or <small>...</small>
may not produce the desired results. (This is true of all templates that generate Html block elements.) If font styling is required, you can use block level alternatives, such as these:
- for smaller font, you may use ⟶
{{small div | {{Lorem ipsum|3}} }}
- for bold ⟶
{{bold div | {{Lorem ipsum|3}} }}
- for italics ⟶
{{italic div | {{Lorem ipsum|3}} }}
The latter two have a parameter to make the text smaller at the same time. Alternatively, if you only need one paragraph of lorem output, consider using {{lorem ipsum span}} instead, which generates an Html inline-level element and so may be used with all the normal in-line wiki markup to alter the font style.
Exceptionally, standard wiki markup may be used when param |join=yes
is in use. See #Running paragraphs together.
Examples
Linking "lorem ipsum"
To include a link the Wikipedia article ipsum, either use param |link=yes
, or place yes
in the fourth positional parameter. {{Lorem ipsum|1|#|link=yes}}
generates:
- 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.
Prefix and suffix
Param 2 is the prefix, and 3 is the suffix added to the beginning and end of each paragraph. In the example below, the prefix is Template:Pval, and the suffix is Template:Pval:
{{Lorem ipsum|2|:* "|"}}
generates:
- "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."
- "Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst."
Note that if param |join=yes
is in effect, the wiki markup behavior of prefix metacharacters #
, *
, and :
is only apparent at the beginning of the output, because there is only one, long paragraph. For example, if prefix is Template:Pval with |join=yes
, the output consists of one long paragraph, numbered "1". The prefix character(s) will still be placed in the content where paragraph breaks would normally occur in non-joined results, but they appear as normal characters (hash, asterisk, colon) and are not interpreted as wiki markup.
Prefix and suffix whitespace
Note that whitespace is important in the second and third parameters. In the example {{Lorem ipsum|1| * " | " }}
the prefix is Template:Pval and the suffix is Template:Pval. The space in front of the asterisk prevents it from being interpreted as a bullet metacharacter, and it is seen as a plain asterisk. This results in the following:
- " 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. "
In this example, the prefix is Template:Pval; the leading white space before the asterisk forces the asterisk to be read as plain text, not a bullet metacharacter.
Running paragraphs together
All requested paragraphs of text can be joined together in one long paragraph using the |join=yes
param. Use of this parameter alters the behavior of param 2 (prefix): see #Prefix and suffix for details. The link param (4) behaves as usual: {{Lorem ipsum|2|link=yes|join=yes}}
will produce:
- 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.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.
Since joined text produces a single string without line breaks and without block-level tags such as <p>, if no prefix metacharacters are in use, the result of transcluding the template with |join=yes
is an inline-level HTML element, meaning that standard wiki markup for font styling (like bold, italic, or font-size such as '<small>') may be used in this case. See #Notes about font styling for details.
Limiting character count to less than one paragraph
If fewer than 446 characters are desired, use {{lorem ipsum}} and truncate to the desired size with {{Str left}}:
{{Str left|{{Lorem ipsum}}|123}}
will result in:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
Full text
{{Lorem ipsum|10}}
will produce:
Extended content
|
---|
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.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst. Fusce convallis, mauris imperdiet gravida bibendum, nisl turpis suscipit mauris, sed placerat ipsum urna sed risus. In convallis tellus a mauris. Curabitur non elit ut libero tristique sodales. Mauris a lacus. Donec mattis semper leo. In hac habitasse platea dictumst. Vivamus facilisis diam at odio. Mauris dictum, nisi eget consequat elementum, lacus ligula molestie metus, non feugiat orci magna ac sem. Donec turpis. Donec vitae metus. Morbi tristique neque eu mauris. Quisque gravida ipsum non sapien. Proin turpis lacus, scelerisque vitae, elementum at, lobortis ac, quam. Aliquam dictum eleifend risus. In hac habitasse platea dictumst. Etiam sit amet diam. Suspendisse odio. Suspendisse nunc. In semper bibendum libero. Proin nonummy, lacus eget pulvinar lacinia, pede felis dignissim leo, vitae tristique magna lacus sit amet eros. Nullam ornare. Praesent odio ligula, dapibus sed, tincidunt eget, dictum ac, nibh. Nam quis lacus. Nunc eleifend molestie velit. Morbi lobortis quam eu velit. Donec euismod vestibulum massa. Donec non lectus. Aliquam commodo lacus sit amet nulla. Cras dignissim elit et augue. Nullam non diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst. Aenean vestibulum. Sed lobortis elit quis lectus. Nunc sed lacus at augue bibendum dapibus. Aliquam vehicula sem ut pede. Cras purus lectus, egestas eu, vehicula at, imperdiet sed, nibh. Morbi consectetuer luctus felis. Donec vitae nisi. Aliquam tincidunt feugiat elit. Duis sed elit ut turpis ullamcorper feugiat. Praesent pretium, mauris sed fermentum hendrerit, nulla lorem iaculis magna, pulvinar scelerisque urna tellus a justo. Suspendisse pulvinar massa in metus. Duis quis quam. Proin justo. Curabitur ac sapien. Nam erat. Praesent ut quam. Vivamus commodo, augue et laoreet euismod, sem sapien tempor dolor, ac egestas sem ligula quis lacus. Donec vestibulum tortor ac lacus. Sed posuere vestibulum nisl. Curabitur eleifend fermentum justo. Nullam imperdiet. Integer sit amet mauris imperdiet risus sollicitudin rutrum. Ut vitae turpis. Nulla facilisi. Quisque tortor velit, scelerisque et, facilisis vel, tempor sed, urna. Vivamus nulla elit, vestibulum eget, semper et, scelerisque eget, lacus. Pellentesque viverra purus. Quisque elit. Donec ut dolor. Duis volutpat elit et erat. In at nulla at nisl condimentum aliquet. Quisque elementum pharetra lacus. Nunc gravida arcu eget nunc. Nulla iaculis egestas magna. Aliquam erat volutpat. Sed pellentesque orci. Etiam lacus lorem, iaculis sit amet, pharetra quis, imperdiet sit amet, lectus. Integer quis elit ac mi aliquam pretium. Nullam mauris orci, porttitor eget, sollicitudin non, vulputate id, risus. Donec varius enim nec sem. Nam aliquam lacinia enim. Quisque eget lorem eu purus dignissim ultricies. Fusce porttitor hendrerit ante. Mauris urna diam, cursus id, mattis eget, tempus sit amet, risus. Curabitur eu felis. Sed eu mi. Nullam lectus mauris, luctus a, mattis ac, tempus non, leo. Cras mi nulla, rhoncus id, laoreet ut, ultricies id, odio. Donec imperdiet. Vestibulum auctor tortor at orci. Integer semper, nisi eget suscipit eleifend, erat nisl hendrerit justo, eget vestibulum lorem justo ac leo. Integer sem velit, pharetra in, fringilla eu, fermentum id, felis. Vestibulum sed felis. In elit. Praesent et pede vel ante dapibus condimentum. Donec magna. Quisque id risus. Mauris vulputate pellentesque leo. Duis vulputate, ligula at venenatis tincidunt, orci nunc interdum leo, ac egestas elit sem ut lacus. Etiam non diam quis arcu egestas commodo. Curabitur nec massa ac massa gravida condimentum. Aenean id libero. Pellentesque vitae tellus. Fusce lectus est, accumsan ac, bibendum sed, porta eget, augue. Etiam faucibus. Quisque tempus purus eu ante. Vestibulum sapien nisl, ornare auctor, consectetuer quis, posuere tristique, odio. Fusce ultrices ullamcorper odio. Ut augue nulla, interdum at, adipiscing non, tristique eget, neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut pede est, condimentum id, scelerisque ac, malesuada non, quam. Proin eu ligula ac sapien suscipit blandit. Suspendisse euismod. Ut accumsan, neque id gravida luctus, arcu pede sodales felis, vel blandit massa arcu eget ligula. Aenean sed turpis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sem eros, ornare ut, commodo eu, tempor nec, risus. Donec laoreet dapibus ligula. Praesent orci leo, bibendum nec, ornare et, nonummy in, elit. Donec interdum feugiat leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque feugiat ullamcorper ipsum. Donec convallis tincidunt urna. Suspendisse et orci et arcu porttitor pellentesque. Sed lacus nunc, fermentum vel, vehicula in, imperdiet eget, urna. Nam consectetuer euismod nunc. Nulla dignissim posuere nulla. Integer iaculis lacinia massa. Nullam sapien augue, condimentum vel, venenatis id, rhoncus pellentesque, sapien. Donec sed ipsum ultrices turpis consectetuer imperdiet. Duis et ipsum ac nisl laoreet commodo. Mauris eu est. Suspendisse id turpis quis orci euismod consequat. Donec tellus mi, luctus sit amet, ultrices a, convallis eu, lorem. Proin faucibus convallis elit. Maecenas rhoncus arcu at arcu. Proin libero. Proin adipiscing. In quis lorem vitae elit consectetuer pretium. Nullam ligula urna, adipiscing nec, iaculis ut, elementum non, turpis. Fusce pulvinar. |
See also
- {{Lorem}} Generates first paragraph of
{{Lorem ipsum}}
Template data
This template generates a filler text for test purposes. Text generated is the well-known "Lorem ipsum" passage, which is gibberish that somewhat resembles Latin. There are 10 distinct paragraphs, but it can produce up to 20.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Number of paragraphs | 1 | Number of paragraphs to be shown. A number from 1 to 20 is acceptable.
| Number | suggested |
Paragraph prefix | 2 | Wikicode or text to prefix to each paragraph. For example, specifying * ( causes each paragraph to become a bullet list and start with an opening parenthesis. | Unbalanced wikitext | optional |
Paragraph suffix | 3 | Wikicode or text to suffix to each paragraph. For example, specifying ) causes each paragraph to end with a closing parenthesis. | Unbalanced wikitext | optional |
Link to [https://en.wikipedia.org/wiki/Lorem_ipsum|lorem ipsum]? | 4 link | Setting this parameter to "yes" causes a link to the "Lorem ipsum" article to appear. | Boolean | optional |
Join all output into one paragraph? | join | Setting this parameter to "yes" causes all output to go into one paragraph.
| Boolean | optional |