This is a documentation subpage for Template:Search subpages link. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
editCreates a link to Wikipedia's internal search function, with the assumption that you want to search on a subpage tree (that is, on all pages whose names share a common prefix). This template takes three unnamed input parameters; you must supply the first one, and the last two are optional.
- A page name prefix consisting of an optional namespace followed by a colon, followed by all or part of a page name. (Required.) Examples:
Wikipedia:Help desk
— (search the English Wikipedia Help desk and its archive pages)Wikipedia:FAQ
— (search the English Wikipedia FAQ)Wikipedia:Village pump
— (search the English Wikipedia Village pump and its archive pages)
- Your search term(s). (Optional.) If this parameter is empty, clicking on the resulting link generates a search form containing a
prefix=
search modifier with the value of the first template parameter. The user must then type search keywords to the left of theprefix=
string in the form.[1] Because the resulting search form is somewhat clumsy for a novice user to edit directly, this template may be most useful if you specify search terms in this second parameter. - Link text to display on your wiki page. (Optional.) If you leave this blank, the template tries to generate some reasonable link text from the first two template parameters.
In general, all pages in a subpage tree will be in the same namespace. If you need to search on entire namespaces, for example more than one namespace at a time, use {{Search link}}.
Do not use in articles
editDo not use this template in articles (as search links are not appropriate in articles). The template is only for talk pages and other process pages (Help desk, WikiProjects, user pages, etc.). The template will produce an ugly messagebox warning if you attempt to use it in an article. |
Examples
editWikipedia has many talk pages (a.k.a. discussion pages) and other project pages that behave similarly (such as the Help desk, the Village pump, the Reference desk, as well as announcement pages such as the Signpost). High-volume talk pages typically have archives consisting of subpages. The template can search on any set of archive pages that follows the right naming structure (many if not most archives on Wikipedia do).
Type this | To get this | What it produces, or searches for |
---|---|---|
{{Search subpages link|Wikipedia:Help desk||Search Wikipedia Help desk}}
|
Search Wikipedia Help desk | Search the Help desk archive (also see: {{Google help desk}} to search with Google) |
{{Search subpages link|Wikipedia:Help desk|How to create a new entry?|}}
|
Search the subpage tree below Wikipedia:Help desk for: How to create a new entry? | Search the Help desk for some keywords; display default link text |
{{Search subpages link|Wikipedia:New contributors' help page/Archive||Search Wikipedia New Contributors' help page archive}}
|
Search Wikipedia New Contributors' help page archive | Search the Wikipedia New Contributors' help page archive |
{{Search subpages link|Wikipedia:Clueless newbies||Search Wikipedia Clueless newbies archive}}
|
Search Wikipedia Clueless newbies archive | Search the Wikipedia Clueless newbies archive (2005-2006) |
{{Search subpages link|Wikipedia:Wikipedia Signpost||Search Wikipedia Signpost}}
|
Search Wikipedia Signpost | Search the Wikipedia Signpost |
{{Search subpages link|Wikipedia:WikiProject||Search WikiProject pages}}
|
Search WikiProject pages | Search the WikiProject pages |
{{Search subpages link|Wikipedia:FAQ||Search all FAQs}}
|
Search all FAQs | Search WP:FAQ and subpages |
{{Search subpages link|Wikipedia:Village pump||Search Wikipedia:Village pump}}
|
Search Wikipedia:Village pump | Search the Village pump, all sections and archives |
{{Search subpages link|Wikipedia:Village pump (policy)||Search Wikipedia:Village pump (policy)}}
|
Search Wikipedia:Village pump (policy) | Search the Village pump (policy) section and its archive |
{{Search subpages link|Wikipedia:Village pump (technical)||Search Wikipedia:Village pump (technical)}}
|
Search Wikipedia:Village pump (technical) | Search the Village pump (technical) section and its archive |
{{Search subpages link|Wikipedia:Village pump (||Search Wikipedia:Village pump (}}
|
Search Wikipedia:Village pump ( | Use the ( character as a search delimiter to search the Village pump sections |
{{Search subpages link|Wikipedia talk:AutoWikiBrowser||search the AutoWikiBrowser discussion archive}}
|
search the AutoWikiBrowser discussion archive | Search the AutoWikiBrowser discussion archive |
{{Search subpages link|Wikipedia:Reliable sources/Noticeboard||search the Reliable sources noticeboard archive}}
|
search the Reliable sources noticeboard archive | Search the Reliable sources noticeboard archive |
{{Search subpages link|Wikipedia:Template messages||search Wikipedia's template messages}}
|
search Wikipedia's template messages | Search the Wikipedia:Template messages subtree |
See also
edit- {{Google custom}} - has similar function, but uses Google search
- {{Search archives}} - generates an inputbox for searching a subpage tree
- {{Search link}} - generates a similar Wikipedia search link, but on entire namespaces
- {{Archive banner}} - generates an inputbox for searching a subpage tree
- User:Teratornis/Notes#New MediaWiki search - development notes for this template
- Wikipedia:Wikipedia Signpost/2008-11-10/Search engine - briefly summarizes the
prefix
search modifier
References
edit- ^ Unfortunately, there seems to be no way to keep the prefix string out of the search field, for example by putting it in the URL as a separate parameter. That can work from inputbox search forms, but evidently not from search URLs.