Template:Cat: Difference between revisions

From Alpine Linux
m (Protected "Template:Cat": Template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(42 intermediate revisions by 2 users not shown)
Line 5: Line 5:
See also:
See also:


* [[:Template:Cmd]]
* [[Template:Cmd]]


====Example====
====Example====


{{Cat|/path/file|Body text
<nowiki>{{Cat|/path/file|Body '''text'''</nowiki> &lt;br /> more<br />
Next line. }}
Second line.}}


produces:


<!--<div style="background-color:#eeeeee; padding:.05em .5em; margin:.5em; border:1px solid #000000;"]<p style="text-decoration:underline;"]<strong]Contents of </strong]{{Path|{{{1}}}}}</p]<p style="white-space:pre; font-family:monospace; font-size:10pt;"]{{{2}}}</p]</div]-->
{{Cat|/path/file|Body '''text''' <br /> more
Second line.}}


</noinclude><onlyinclude><div style="background-color:#eeeeee; padding:.05em .5em; margin:.5em; border:1px solid #000000; border-left:2px solid #000000; white-space:pre; font-family:monospace; font-size:10pt;"><p># {{{1}}}</p><p>{{{2}}}</p></div></onlyinclude>
You must escape characters as follows:
 
<pre>
  = not inside [[..]] use &amp;#61; or {{=}}
  | not inside [[..]] use &amp;#124; or {{!}}
  {{                  use &amp;#123; twice or {{lb}}
  }}                  use &amp;#125; twice or {{rb}}
  unmatched [[        use &amp;#91; twice
  unmatched ]]        use &amp;#93; twice
  #                  use &amp;#35;
</pre>
 
 
</noinclude><includeonly><div><p style="background-color:#f9f9f9; border:1px solid #2f6fab; border-bottom:0; padding:.2em 1.2em; display:inline;"><strong>Contents of </strong>{{Path|{{{1}}}}}</p><div style="background-color:#f9f9f9; border:1px dashed #2f6fab; border-left:1px solid #2f6fab; margin-top:-.2em; line-height:1.1em; padding:1em; font-family:monospace; font-size:10pt; white-space:pre; overflow:auto;">{{#tag:nowiki|{{{2}}}}}</div></div></includeonly>

Latest revision as of 08:34, 30 May 2017

Template Documentation for Cat

This page is a template and should only be used as part of other articles. For more information, read Help:Template.

Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.

Feel free to voice your opinion regarding this template.

A box displaying file contents.

Template Documentation

See also:

Example

{{Cat|/path/file|Body '''text''' <br /> more
Second line.}}

produces:

Contents of /path/file

Body '''text''' <br /> more Second line.

You must escape characters as follows:

   = not inside [[..]] use &#61; or {{=}}
   | not inside [[..]] use &#124; or {{!}}
   {{                  use &#123; twice or {{lb}}
   }}                  use &#125; twice or {{rb}}
   unmatched [[        use &#91; twice
   unmatched ]]        use &#93; twice
   #                   use &#35;