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

From blackwiki
Jump to navigation Jump to search
imported>Petr Matas
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
Line 17: Line 17:
 
* {{tl|Link if equal}}
 
* {{tl|Link if equal}}
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{Sandbox other||
 
<!-- Categories go here and interwikis go in Wikidata. -->
 
<!-- Categories go here and interwikis go in Wikidata. -->
 
[[Category:Conditional link templates]]
 
[[Category:Conditional link templates]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 00:02, 26 April 2020

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