Template:HandbookLink/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 template is used to create an internal link inside of the Handbook. Its design intention is to point to the appropriate equivalent translated page, if it exists.

Important
This template will only work within the Handbook namespace; it will not work correctly in any other place...

Parameters

The unnamed parameter should exclude the BASEPAGE name of "Handbook:" or "Parts:", but include the rest of the canonical path and, if applicable, the section name as well. For example:

{{HandbookLink|Blocks/Bootloader|section=#Debugging GRUB|Debugging GRUB}}

Link to a page that can automatically point to a translated page if it exists

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Link1

Internal Handbook link

Example
Blocks/Bootloader
Stringrequired
Sectionsection anchor

A section of an internal link with a preceding # to designate an anchor

Example
#Debugging GRUB
Stringoptional
Alternate text2

Optional text to replace the page name; use for translations and other context

Example
Debugging GRUB
Stringsuggested

Rationale

Note
To do

Usage

See the template's testcases:


Correct

One anonymouse parameter (an internal link)
Wiki code
{{HandbookLink|Blocks/Bootloader}}
Main version
Sandbox version


Two anonymous parameters (an internal link and alternate text)
Wiki code
{{HandbookLink|Blocks/Bootloader|Bootloader}}
Main version
Sandbox version


Two anonymous parameters (an internal link and alternate text) and section
Wiki code
{{HandbookLink|Blocks/Bootloader|section=#Debugging GRUB|Debugging GRUB}}
Main version
Sandbox version


See also