Difference between revisions of "Template:Linkexist"

From blackwiki
Jump to navigation Jump to search
imported>Thumperward
(re-add {{{4}}}, suppresses {{{2}}} if niot present)
imported>Muhadasgardezi
m
Line 1: Line 1:
 
{{#if:{{{3|}}}|[[{{{3}}}{{!}}{{#if:{{{2|}}}|{{{2}}}}}]]|{{#ifexist:{{{1}}}|[[{{{1}}}{{!}}{{#if:{{{2|}}}|{{{2}}}}}]]|{{#if:{{{4|}}}|{{{2|}}}}}}}}}<noinclude>{{doc}}</noinclude>
 
{{#if:{{{3|}}}|[[{{{3}}}{{!}}{{#if:{{{2|}}}|{{{2}}}}}]]|{{#ifexist:{{{1}}}|[[{{{1}}}{{!}}{{#if:{{{2|}}}|{{{2}}}}}]]|{{#if:{{{4|}}}|{{{2|}}}}}}}}}<noinclude>{{doc}}</noinclude>
 +
http://www.songsportalhd.tk

Revision as of 21:40, 9 September 2017

Template documentation[view] [edit] [history] [purge]

NOTE: This template has confusing behaviour, poor incomplete documentation, and produces invalid wikitext in some cases.

The template is a way of creating optional links based on whether the target exists or not.

It is presently used in {{culture of region}}, as that template uses the logic in question so many times that transcluding it every time would lead to cluttered code.

Usage

{{linkexist|page|linktext|alternative}}

If alternative is specified, the template will link to that title. Otherwise, the template will link to page if it exists. linktext, if specified, will be the label for the link (or unlinked output).

Examples

{{linkexist|History of Ghana}}


http://www.songsportalhd.tk

{{linkexist|History of Ghana|History}}


http://www.songsportalhd.tk

{{linkexist|History of Ghana|History|Culture of Ghana}}

History http://www.songsportalhd.tk

See also

http://www.songsportalhd.tk