Template:Nwlh: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><span class="non-wlh-link">[https://tardis.fandom.com/wiki/{{#explode:{{#replace:{{#replace:{{{1|}}}|<nowiki>[[</nowiki>|}}|<nowiki>]]</nowiki>|}}|<nowiki>|</nowiki>|0}} {{#if:{{#explode:{{#replace:{{#replace:{{{1|}}}|<nowiki>[[</nowiki>|}}|<nowiki>]]</nowiki>|}}|<nowiki>|</nowiki>|1}}|{{#explode:{{#replace:{{#replace:{{{1|}}}|<nowiki>[[</nowiki>|}}|<nowiki>]]</nowiki>|}}|<nowiki>|</nowiki>|1}}|{{#explode:{{#replace:{{#replace:{{{1|}}}|<nowiki>[[</nowiki>|}}|<nowiki>]]</nowiki>|}}|<nowiki>|</nowiki>|0}}}}]</span></includeonly><noinclude>{{Documentation}}[[Category:Coding utility templates]]</noinclude>
<includeonly>{{#invoke:Non-WLH link|nonWLHLink}}</includeonly><noinclude>{{Documentation}}[[Category:Coding utility templates]]</noinclude>

Revision as of 17:13, 30 June 2023

Instructions for {{Nwlh}}
{{nwlh}} (short for Non-WhatLinksHere) is a template that causes the link passed to it to not display in Special:WhatLinksHere. This can be useful to stop links included in certain templates from flooding the special page, making it unuseable. It also makes the links harder to detect in an automated fashion, however, so should be used judiciously. As such, it should primarily be used in other templates. Usage is very simple. Simply use the template as a wrapper around a normal link.
{{nwlh|[[page name|optional display text]]}}

For example:

{{nwlh|[[Rose (TV story)|Rose]]}}Lua error in Module:LinkUtil at line 41: attempt to call method 'gsub' (a nil value).
{{nwlh|[[The Doctor|Dr Who]]}}Lua error in Module:LinkUtil at line 41: attempt to call method 'gsub' (a nil value).
{{nwlh|[[The Master]]}}Lua error in Module:LinkUtil at line 41: attempt to call method 'gsub' (a nil value).

You can also combine it with other templates like {{da}}:

{{nwlh|{{da|Campaign (unreleased novel)}}}}Lua error in Module:LinkUtil at line 41: attempt to call method 'gsub' (a nil value).

This template works by converting the internal wikilinks to external links. Hence, to search for links using this template, Special:LinkSearch can be used.

Note that any links to non-existant pages passed into this template actually will cause them to appear in Special:WhatLinksHere.

This template uses Module:Non-WLH link.