Template:Search link: Difference between revisions
Appearance
put the nowiki's back so leading * and # are escaped from wiki markup |
change parameter names from {{{text}}} and {{{link}}} to {{{query}}} and {{{label}}} |
||
| Line 2: | Line 2: | ||
| 1={{Warning|{{tl|Search link}} should not be used in [[WP:WIAA|articles]] as links to "search result pages" are among the [[WP:LINKSTOAVOID|links normally to be avoided]].}} | | 1={{Warning|{{tl|Search link}} should not be used in [[WP:WIAA|articles]] as links to "search result pages" are among the [[WP:LINKSTOAVOID|links normally to be avoided]].}} | ||
| 2=<span class="plainlinks">[{{fullurl:Special:Search|search=<!-- | | 2=<span class="plainlinks">[{{fullurl:Special:Search|search=<!-- | ||
-->{{urlencode:{{{1|{{{ | -->{{urlencode:{{{1|{{{query|}}}}}}}}<!-- Given query | ||
-->{{#if:{{{ns|}}} <!-- ns = all / ns0=1&ns5=1 --> | -->{{#if:{{{ns|}}} <!-- ns = all / ns0=1&ns5=1 --> | ||
| {{#ifeq: {{{ns}}} | all | | {{#ifeq: {{{ns}}} | all | ||
| Line 54: | Line 54: | ||
-->|{{#invoke:String|replace | -->|{{#invoke:String|replace | ||
|{{#if: | |{{#if: | ||
{{{2|{{{ | {{{2|{{{label|}}}}}}<!-- If a label is given, --> | ||
|<nowiki />{{{2|{{{ | |<nowiki />{{{2|{{{label|}}}}}}<!-- protect it from a leading * or # --> | ||
|<nowiki />{{{1|{{{ | |<nowiki />{{{1|{{{query|}}}}}}<!-- by using <nowiki /> (Help:wikitext) | ||
-->}}<!-- | -->}}<!-- | ||
-->|[|[}}<!-- ] with its html symbol | -->|[|[}}<!-- ] with its html symbol | ||
Revision as of 20:10, 22 July 2015
File:Test Template Info-Icon - Version (2).svg Template documentation[create] [purge]