Template:Get
This content is in the Template Namespace. Used for page-templates that can be re-used across the wiki.
Usage
It is not necessary (but expected) when using this template that a page exists detailing the commands usage, it is from this page that the example and tool tip is taken, for the purpose of the examples below a test page has been created: Cli:Command show
| Only Specify the Command: |
{{Get|Command show}}
|
| Provide a different example : |
{{Get|Command show|example=
<pre>
cli> dns show
# | id | addresses
----+------+-------------
1 | DNS1 | 10.24.27.42
| | 10.24.27.41
</pre>}}
|
| Provide a different example, this time using syntaxhighlight and recoloring: |
{{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
</syntaxhighlight>}}
|
| Specify alternative section of page to pull example from: |
{{Get|Command show|section=hosts}}
|
| Show alternative Text: |
{{Get|command show|volume show|color=blue-white}}
|
| Show alternative Text and specify code example, no need to use "example=" if the example is the 3rd paramater: |
{{Get|command show|volume show|<pre>sample code</pre>|section=YourSectionName}}
|
| Display several commands without additional line breaks: |
{{Get|command show|command one|<pre>command one sample code</pre>|inline=1}}{{Get|command show|command one|<pre>command two sample code</pre>|inline=1}}{{Get|command show|command one|<pre>command three sample code</pre>|inline=1}} |
|
|
| Change color and display open: |
{{Get|Command show|open=1|color=basic}}
|
Show a Command with a collapsed div containing an example
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Command Name | 1 | Command Name, will like match page name describing this command
| String | required |
| Alternative Command Description | 2 | Either Alternate Description of Command or an Example
| String | optional |
| Sample output | 3 | An example output of runing this command
| String | optional |
| Pre Color | color | Color of Pre-formatted Example
| String | optional |
| Name of page section | Section | Name of page section where pre-formatted example is found
| String | optional |
| Open | open | Shows pre-formatted example as open by default
| Boolean | optional |
| Inline | inline | Removes all new lines / carraige returns
| Boolean | optional |
| Sample output | example | An example output of runing this command
| String | optional |
| Alternative Command Description | alt-text | Either Alternate Description of Command or an Example
| String | optional |