Template:Search link: Difference between revisions
Appearance
fix default namespace, add comments; update recent new namespaces: gadgets |
improve the way it defaults even more: any of the 17 positional parameters can avoid a default |
||
| Line 3: | Line 3: | ||
| 2=<span class="plainlinks">[{{fullurl:Special:Search|search=<!-- | | 2=<span class="plainlinks">[{{fullurl:Special:Search|search=<!-- | ||
-->{{urlencode:{{{query|{{{text|{{{1|}}}}}}}}}}}<!-- Given query | -->{{urlencode:{{{query|{{{text|{{{1|}}}}}}}}}}}<!-- Given query | ||
-->{{#if:{{{ns|}}}{{{3|}}} | -->{{#if:{{{ns|}}} {{{3|}}} {{{4|}}} {{{5|}}} {{{6|}}} {{{7|}}} {{{8|}}} {{{9|}}}{{{10|}}} {{{11|}}} {{{12|}}} {{{13|}}} {{{14|}}} {{{15|}}} {{{16|}}} {{{17|}}} {{{18|}}} {{{19|}}} {{{20|}}} | ||
| <!-- either ns or 3 has a value set--> | | <!-- either ns or 3-20 has a value set--> | ||
{{#if:{{{ns|}}} <!-- is ns set? --> | {{#if:{{{ns|}}} <!-- is ns set? --> | ||
| {{#ifeq: {{{ns}}} | all <!-- Yes. Is the value "all"? | | {{#ifeq: {{{ns}}} | all <!-- Yes. Is the value "all"? | ||
| Line 57: | Line 57: | ||
#if:{{{20|}}}| &{{lc:{{{20|}}}}}=1 | #if:{{{20|}}}| &{{lc:{{{20|}}}}}=1 | ||
}} | }} | ||
|&ns0=1<!-- Neither ns nor 3 were set. | |&ns0=1<!-- Neither ns nor 3-20 were set. | ||
So made Template Search link's default search domain | So made Template Search link's default search domain | ||
equal to article space; | equal to article space; | ||
Revision as of 23:25, 19 August 2015
File:Test Template Info-Icon - Version (2).svg Template documentation[create] [purge]