This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Template:Path/doc

From Gentoo Wiki (test)
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.

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.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 Yes (n/a) The path to display.
link No (n/a) If present, create a link to the same-named article.

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