Template:Search linkEdit This Page

From FamilySearch Wiki

{{search link|search string|link text}}

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

This is the {{search link}} template.

It creates a link to the FamilySearch Wiki search.


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 FamilySearch Wiki 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 main (article) space 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.

If you want to search several namespaces it can be a bit tricky to get the namespace numbers right. A convenient way is to go to Special:Search and select the namespaces you want there, fill in a search string, and then run the search. Then you can simply copy the namespace list from the URL you get, and feed that list to this template. Say you select the "FamilySearch Wiki:" and "Help:" spaces, then you get the namespace list "ns4=1&ns12=1". Then feed it to this template like this:

{{search link|search string| ns = ns4=1&ns12=1 }} = search string
{{search link|search string|link text| ns = ns4=1&ns12=1 }} = link text

Don't forget to use the "ns = " part.


The template is only for talk pages, user pages, help pages, etc., and should not be used in regular articles. If {{search link}} is included in an article, it will issue the following warning:

See also

  • {{google custom}} - creates a search link to search with Google on all or part of a Web site; can search on a FamilySearch Wiki namespace or a subpage tree.
  • {{search}} – Creates several search links at the same time, to several different search engines and different encyclopedias.
  • {{search subpages link}} - creates a link to search a subpage tree on FamilySearch Wiki (for example, a discussion archive).
  • {{wpsearch}} – Creates two search links, one to FamilySearch Wiki search and one to Google search.
  • {{search box}} - unrestricted search of any subset of any FamilySearch Wiki namespace pages
  • This page was last modified on 30 October 2010, at 15:09.
  • This page has been accessed 378 times.