Template:Get: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
No edit summary
Line 6:
 
 
== Usage ==
Syntax Examples -
Only Specify the Command:
<pre>{{Get|command|section=YourSectionName}}</pre><br>
{{Note|If you omit the section=YourSectionName, by default the section called example will be used}}
 
{| class="wikitable"
Show alternative Text:
|Only Specify the Command:
<pre>{{Get|command|alt text|section=YourSectionName}}</pre><br>
|-
|<pre>{{Get|Command show}}</pre>
|-
|{{Get|Command show}}
|}
 
Show alternative Text and specify code sample:
<pre>{{Get|command|alt text|&lt;pre&gt;sample code&lt;/pre&gt;|section=YourSectionName}}</pre><br>
 
{| class="wikitable"
By setting the boolean "open" the code sample is shown by default:
|Provide a different example :
<pre>{{Get|command|alt text|&lt;pre&gt;sample code&lt;/pre&gt;|open=1|section=YourSectionName}}</pre><br>
|-
|<pre>{{Get|Command show|example=&lt;pre&gt;cli> dns show
# | id | addresses
----+------+-------------
1 | DNS1 | 10.24.27.42
| | 10.24.27.41&lt;/pre&gt;}}</pre>
|-
|{{Get|Command show|example=
<pre>
cli> dns show
# | id | addresses
----+------+-------------
1 | DNS1 | 10.24.27.42
| | 10.24.27.41
cli>
</pre>}}
|}
 
 
With the Word "open" the code sample is shown by default:
{| class="wikitable"
<pre>{{Get|command|alt text|&lt;pre&gt;sample code&lt;/pre&gt;|open=1|color=blue-white|section=YourSectionName}}</pre>
|Provide a different example, this time using syntaxhighlight and recoloring:
|-
|<pre>{{Get|Command show|color=black-white|example=&lt;syntaxhighlight lang="text" highlight="4"&gt;cli> dns show
# | id | addresses
----+------+-------------
1 | DNS1 | 10.24.27.42
| | 10.24.27.41&lt;/syntaxhighlight&gt;}}</pre>
|-
|{{Get|Command show|color=black-white|example=
<syntaxhighlight lang="text" highlight="4">
cli> dns show
# | id | addresses
----+------+-------------
1 | DNS1 | 10.24.27.42
| | 10.24.27.41
cli>
</syntaxhighlight>}}
|}
 
 
{| class="wikitable"
|Specify alternative section of page to pull example from:
|-
|<pre>{{Get|Command show|section=hosts}}</pre>
|-
|{{Get|Command show|section=hosts}}
|}
 
 
{{Note|If you omit the section &#61;YourSectionName, by default the section called example will be used}}
 
 
{| class="wikitable"
|Show alternative Text:
|-
|<pre>{{Get|command show|volume show|color=blue-white}}</pre>
|-
|{{Get|command show|volume show|color=blue-white}}
|}
 
 
{| class="wikitable"
|Show alternative Text and specify code example, no need to use "example=" if the example is the 3rd paramater:
|-
|<pre>{{Get|command show|volume show|&lt;pre&gt;sample code&lt;/pre&gt;|section=YourSectionName}}</pre>
|-
|{{Get|command show|volume show|<pre>sample code</pre>}}
|}
 
 
{| class="wikitable"
|Display several commands without additional line breaks:
|-
|
<pre>{{Get|command show|command one|&lt;pre&gt;command one sample code&lt;/pre&gt;|section=YourSectionName}}</pre><br>
<pre>{{Get|command show|command one|&lt;pre&gt;command two sample code&lt;/pre&gt;|section=YourSectionName}}</pre><br>
<pre>{{Get|command show|command one|&lt;pre&gt;command three sample code&lt;/pre&gt;|section=YourSectionName}}</pre><br>
|-
|
{{Get|command show|command one|<pre>command one sample code</pre>|inline=1}}<br>
{{Get|command show|command two|<pre>command two sample code</pre>|inline=1}}<br>
{{Get|command show|command three|<pre>command three sample code</pre>|inline=1}}<br>
|}
 
 
{| class="wikitable"
|Change color and display open:
|-
|<pre>{{Get|Command show|open=1|color=basic}}</pre>
|-
|{{Get|Command show|open=1|color=basic}}
|}