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.

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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Path name1

The path to display

Example
/etc/portage/make.conf
Stringrequired
Link to articlelink

If present, create a link to the same-named article

Booleanoptional

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
Parameter: link (any value)
Wiki code {{Path|/etc/fstab|link=y}}

Main version /etc/fstab
Sandbox version

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
Parameter: link (no value)
Wiki code {{Path|/etc/fstab|link=}}

Main version /etc/fstab
Sandbox version

See also