Difference between revisions of "Template:Link if not current"
Jump to navigation
Jump to search
imported>Pppery (Add a star on current page to avoid LISTGAP issues) |
imported>Pppery |
||
| Line 1: | Line 1: | ||
| − | {{#ifeq:{{{1}}}|{{PAGENAME}}| | + | {{#ifeq:{{{1}}}|{{PAGENAME}}|| |
*[[{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]}}<noinclude> | *[[{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]}}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 14:16, 19 February 2017
- [[{{{1}}}|{{{1}}}]]
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
- {{No selflink}} – always outputs the text (either linked or not) and NOT embedded in a list item
- {{Link if exists}}
- {{Link if equal}}
| The above documentation is transcluded from Template:Link if not current/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |