Template:Lorem ipsum/doc

From Second Life Wiki
Jump to navigation Jump to search

This template outputs the ""Wikipedia logo"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.

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 Lorem 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.
  • cat – Adds article to Category:Wikipedia articles containing placeholders, unless |cat = no (default: 'yes')

Notes about font styling

For most parameter combinations, this template produces block-level Html output, and for those cases, font styling using "Wikipedia logo"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 link the incipit (the first two words of paragraph one, i.e. Lorem ipsum) to the Wikipedia article Lorem 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 adipiscing 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 :

  • &*
  • &#*
  • &#4*
  • &#42*
  • **
  • *
  • *
  • *
  • &*
  • *
  • &**
  • *
  • &*
  • *
  • &*
  • *
  • &*
  • &*
  • *
  • &*
  • &#*
  • *
  • &*
  • &#**
  • *
  • &*
  • &#*
  • *
  • &*
  • &#*
  • *
  • &*
  • &#*
  • &*
  • *
  • &*
  • &#*
  • &#*
  • *
  • &*
  • &#*
  • &#3*
  • *
  • &*
  • &#*
  • &#3**
  • *
  • &*
  • &#*
  • &#3*
  • *
  • &*
  • &#*
  • &#3*
  • *
  • &*
  • &#*
  • &#3*
  • &*
  • *
  • &*
  • &#*
  • &#3*
  • &#*
  • *
  • &*
  • &#*
  • &#3*
  • &#3*
  • *
  • &*
  • &#*
  • &#3*
  • &#35*
  • *
  • &*
  • &#*
  • &#3*
  • &#35**
  • *
  • &*
  • &#*
  • &#3*
  • &#35*
  • &#4, and the suffix is :
  • &*
  • &#*
  • &#4*
  • &#42*
  • **
  • *
  • *
  • *
  • &*
  • *
  • &**
  • *
  • &*
  • *
  • &*
  • *
  • &*
  • &*
  • *
  • &*
  • &#*
  • *
  • &*
  • &#**
  • *
  • &*
  • &#*
  • *
  • &*
  • &#*
  • *
  • &*
  • &#*
  • &*
  • *
  • &*
  • &#*
  • &#*
  • *
  • &*
  • &#*
  • &#3*
  • *
  • &*
  • &#*
  • &#3**
  • *
  • &*
  • &#*
  • &#3*
  • *
  • &*
  • &#*
  • &#3*
  • *
  • &*
  • &#*
  • &#3*
  • &*
  • *
  • &*
  • &#*
  • &#3*
  • &#*
  • *
  • &*
  • &#*
  • &#3*
  • &#3*
  • *
  • &*
  • &#*
  • &#3*
  • &#35*
  • *
  • &*
  • &#*
  • &#3*
  • &#35**
  • *
  • &*
  • &#*
  • &#3*
  • &#35*
  • &#4:

{{Lorem ipsum|2|:* "|"}} generates:

:* "Lorem ipsum dolor sit amet, consectetur adipiscing 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."Template:Lorem ipsum/pb-cond:* "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 Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!". 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 Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!". and the suffix is Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".. 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:

Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".

In this example, the prefix is Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".; 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:

Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".

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 "Wikipedia logo"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 span}} and truncate to the desired size with Template:Str left:

{{Str left|{{Lorem ipsum span}}|123}} will result in:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Full text

{{Lorem ipsum|10}} will produce:

Extended content
Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".Expression error: Unrecognized punctuation character "!".

See also

Template data

This is the "Wikipedia logo"TemplateData for this template used by TemplateWizard, "Wikipedia logo"VisualEditor and other tools. click here to see a monthly parameter usage report for this template.

TemplateData for Lorem ipsum

{
	"description": "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.",
	"params": {
		"1": {
			"label": "Number of paragraphs",
			"description": "Number of paragraphs to be shown. A number from 1 to 20 is acceptable.",
			"type": "number",
			"suggested": true,
			"default": "1"
		},
		"2": {
			"label": "Paragraph prefix",
			"description": "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.",
			"type": "unbalanced-wikitext"
		},
		"3": {
			"label": "Paragraph suffix",
			"description": "Wikicode or text to suffix to each paragraph. For example, specifying ) causes each paragraph to end with a closing parenthesis.",
			"type": "unbalanced-wikitext"
		},
		"4": {
			"aliases": [
				"link"
			],
			"label": "Link to [[Lorem ipsum]]?",
			"description": "Setting this parameter to \"yes\" causes a link to the \"Lorem ipsum\" article to appear.",
			"type": "boolean"
		},
		"join": {
			"label": "Join all output into one paragraph?",
			"description": "Setting this parameter to \"yes\" causes all output to go into one paragraph.",
			"type": "boolean",
			"default": "no"
		},
		"cat": {
			"label": "Add to category \"Wikipedia articles containing placeholders\"?",
			"description": "Setting this parameter to \"no\" prevents the page from being added to [[Category:Wikipedia articles containing placeholders]].",
			"type": "boolean",
			"default": "yes"
		}
	}
}
<!--</templatedata>-->