Template:PreBox/sandbox
From Gentoo Wiki
Jump to:navigation
Jump to:search
{{{title}}}
{{{1}}}
[edit]
Documentation
Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages.
As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.
Displays a block element with for use with the following child templates: {{CodeBox}}, {{FileBox}}, and {{KernelBox}}.
Important
The contents may contain special characters (
The contents may contain special characters (
|
or =
) that break the MediaWiki templating system. The following options are available to put the contents should the need arise to escape these characters:
{{PreBox|1=contents}}
{{PreBox|1=<nowiki>contents</nowiki>}}
{{PreBox|1=<pre>contents</pre>}}
Known problems
Example | Wiki code | How it looks | Possible solution |
---|---|---|---|
<pre> inside boxes will render '"`UNIQ--pre-000000XX-QINU`"'
|
{{#tag:source|<pre>echo "Hello, world!"</pre>|lang=bash}} |
'"`UNIQ--pre-0000000D-QINU`"'
|
Don't use <pre> tags. |
<source> inside boxes will render '"`UNIQ--source-000000XX-QINU`"'
|
{{#tag:source|<source type="git">bla-bla</source>|lang=xml}} |
'"`UNIQ--source-00000013-QINU`"'
|
No known solution. |
if <> symbols inside boxes and <nowiki> is used than <> will be replaced with < > | {{#tag:source|<nowiki ><></nowiki>|lang=text}} |
<>
|
Don't use lang parameter. Or don't use <nowiki> and replace all | with {{!}} |
Parameters
Parameter name | Required? | Default value | Description |
---|---|---|---|
Anonymous parameter 1 |
Yes | (n/a) | Kernel configuration. |
title |
No | (n/a) | Display's a title in the box header. |
Usage
See the template's testcases: Template:PreBox/testcases
See also
Note
The above documentation is transcluded from Template:PreBox/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)
The above documentation is transcluded from Template:PreBox/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)