Template:Path/doc
From Gentoo Wiki
Jump to:navigation
Jump to:search
Note
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.
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.
Parameters
Use this template to markup a path to a file or program (or directory) on the filesystem. It can also be used to illustrate navigation through a user interface.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Path name | 1 | The path to display
| String | required |
Link to article | link | If present, create a link to the same-named article | Boolean | optional |
Note that link
can be set to any string containing non-whitespace (y
is probably a good choice), but you cannot use just the parameter name alone with no value (link
or link=
), as seen in the testcases below. (Also, beware: link=n
would be treated exactly the same as link=y
!)
Usage
See the template's testcases:
Correct
One unnamed parameter | |
---|---|
Wiki code | {{Path|/etc/fstab}}
|
Main version | /etc/fstab |
Sandbox version | /etc/fstab |
Parameter: link (any value) | |
---|---|
Wiki code | {{Path|/etc/fstab|link=y}}
|
Main version | /etc/fstab |
Sandbox version | /etc/fstab |
Incorrect
No parameter | |
---|---|
Wiki code | {{Path}}
|
Main version | |
Sandbox version |
Multiple unnamed parameters (not supported) | |
---|---|
Wiki code | {{Path|/etc/fstab|link}}
|
Main version | /etc/fstab |
Sandbox version | /etc/fstab |
Parameter: link (no value) | |
---|---|
Wiki code | {{Path|/etc/fstab|link=}}
|
Main version | /etc/fstab |
Sandbox version | /etc/fstab |