Difference between revisions of "Template:Link if not current/doc"

From blackwiki
Jump to navigation Jump to search
imported>Petr Matas
(more specific category)
imported>Petr Matas
(update)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
+
 
 +
Use this template to avoid producing a [[help:self link|self link]].
  
 
== Usage ==
 
== Usage ==
*Parameter 1 is necessary, as it is the link. To avoid self-linking, the parameter is unlinked if the name of the input in parameter 1 is the same as the name of the page's title.
+
<code>{{tlp|Link if not current|Article}}</code> produces
 +
* a list item linking to [[Article]] if the current page's title is not <code>Article</code>,
 +
* nothing if it is.
 +
 
 +
=== Parameters ===
 +
*Parameter 1 is necessary, as it is the link.
 
*Parameter 2 is optional, and it is the text that is displayed over the link. If parameter 2 doesn't exist, it defaults to parameter 1.
 
*Parameter 2 is optional, and it is the text that is displayed over the link. If parameter 2 doesn't exist, it defaults to parameter 1.
  

Revision as of 10:28, 21 October 2014

Use this template to avoid producing a self link.

Usage

{{Link if not current|Article}} produces

  • a list item linking to Article if the current page's title is not Article,
  • nothing if it is.

Parameters

  • Parameter 1 is necessary, as it is the link.
  • Parameter 2 is optional, and it is the text that is displayed over the link. If parameter 2 doesn't exist, it defaults to parameter 1.

See also