Template:Search link
{{search link|search string|link text}}
This is the {{search link}} template.
It creates a link to the Wikibooks search.
Usage
editWikibooks namespaces | |||
---|---|---|---|
Basic namespaces | Talk namespaces | ||
0 | Main | Talk | 1 |
2 | User | User talk | 3 |
4 | Wikibooks | Wikibooks talk | 5 |
6 | File | File talk | 7 |
8 | MediaWiki | MediaWiki talk | 9 |
10 | Template | Template talk | 11 |
12 | Help | Help talk | 13 |
14 | Category | Category talk | 15 |
102 | Cookbook | Cookbook talk | 103 |
108 | Transwiki | Transwiki talk | 109 |
110 | Wikijunior | Wikijunior talk | 111 |
112 | Subject | Subject talk | 113 |
710 | TimedText | TimedText talk | 711 |
828 | Module | Module talk | 829 |
Virtual namespaces | |||
-1 | Special | ||
-2 | Media |
This template takes one or more parameters. The first unnamed parameter is the word or phrase to search for. The second unnamed parameter is the caption for the link.
Here are some examples. Code to the left and actual rendering to the right:
{{search link|search string}}
= search string
{{search link|search string|link text}}
= link text
When doing a basic search like that Wikibooks only searches the namespaces that the user has set in "My preferences - Search - Namespaces". If you want to specify what namespaces the search will use, then this template has several ways to do that.
To search all namespaces:
{{search link|search string|ns=all}}
= search string{{search link|search string|link text|ns=all}}
= link text
To specify some namespaces, for instance mainspace and its talk space (ns0 and ns1):
{{search link|search string||ns0|ns1}}
= search string{{search link|search string|link text|ns0|ns1}}
= link text
Note the empty link text parameter in the first example above. That is because the parameters are unnamed. If "ns0" were fed as the second parameter then it would become the link text, not the first namespace to search.
See also
edit- {{search box}} - unrestricted search of any subset of any namespace