Jump to content

Template:Box/Doc: Difference between revisions

From NixOS Wiki
DoggoBit (talk | contribs)
Created page with "This template is used to generate boxes that can hold content. In particular, boxes are used for notices. An example of a box holding content: {{Box|This is a box with some text content}} ===Usage=== Simply feed in your content as the first argument to the template: <pre> {{Box|Some content}} </pre> If you need content that is styled via MediaWiki syntax, you might need to place your content on a new line: <pre> {{Box| ==Heading== Some content }..."
 
DoggoBit (talk | contribs)
No edit summary
 
Line 7: Line 7:
Simply feed in your content as the first argument to the template:
Simply feed in your content as the first argument to the template:


<pre>
{{code|lang=mediawiki|line=no|<nowiki>{{Box|This is a box with some text content}}</nowiki>}}
{{Box|Some content}}
</pre>


If you need content that is styled via MediaWiki syntax, you might need to place your content on a new line:
If you need content that is styled via MediaWiki syntax, you might need to place your content on a new line. You can also set the <code>wikiContent</code> argument in order to adjust the padding of the box to fit the content in a more visually appealing manner:


<pre>
{{code|lang=mediawiki|line=no|<nowiki>
{{Box|
{{Box|wikiContent=yes|
== Heading ==
Some content
}}
</nowiki>}}
 
{{Box|wikiContent=yes|
==Heading==
==Heading==
Some content
Some content
}}
}}
</pre>

Latest revision as of 15:53, 6 June 2025

This template is used to generate boxes that can hold content. In particular, boxes are used for notices. An example of a box holding content:

This is a box with some text content

Usage

Simply feed in your content as the first argument to the template:

{{Box|This is a box with some text content}}

If you need content that is styled via MediaWiki syntax, you might need to place your content on a new line. You can also set the wikiContent argument in order to adjust the padding of the box to fit the content in a more visually appealing manner:

{{Box|wikiContent=yes|
== Heading ==
Some content
}}

Heading

Some content