Template:Wlc

From Gentoo Wiki
Jump to:navigation Jump to:search
[edit

Documentation

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 provides a convenient way of referring to the wiki markup necessary to create a wikilink — i.e., the [[double-brackets]] syntax — without having to use a <nowiki> element or HTML entities like &#91; to suppress parsing of the link.

While such "fake" wikilinks are useful in help pages or on talk pages, they should not appear in articles (in the main namespace).

The resulting text is displayed using a <code> element. Variations on this, provided by similar templates, are listed below.

The name of this template is based on the fact that it displays the markup necessary to make a Wikilink, shown as code.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 No (n/a) Text to "link".
Anonymous parameter 2 No (n/a) Optional "pipe" text.

Note that calling this template with no parameters is fine, as shown below.

Usage

{{Wlc|Title}}
{{Wlc|Title|Link text}}

See the template's testcases:

Correct

No parameter
Wiki code
{{Wlc}}
Main version
[[]]
Sandbox version


One anonymous parameter
Wiki code
{{Wlc|Page title}}
Main version
[[Page title]]
Sandbox version


Two anonymous parameters
Wiki code
{{Wlc|Page title|link text}}
Main version
[[Page title|link text]]
Sandbox version


Incorrect

Three anonymous parameters (not supported)
Wiki code
{{Wlc|Page title|link text|something else?}}
Main version
[[Page title|link text]]
Sandbox version


See also[edit]

The complete family of templates similar to this one (with example output for each):

  • {{Wl}} – show markup for Wikilink → [[fubar]]
  • {{Wlc}} – show markup for Wikilink using <code> element → [[fubar]]
  • {{Wlm}} – show markup for Wikilink using a monospace font → [[fubar]]
Note
The above documentation is transcluded from Template:Wlc/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)