Template:Search box/sandbox

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]

This template creates a simple search box for a page's all subpages, like archives.


Simple {{search box}} creates a search box. The scope is all subpages of the tagged page, excluding that page itself.

{{search box
 |root= /


The target page. |root=User talk:Example/Archives will search all subpages of User talk:Example/Archives. The default is the current page name.
By default, the target page itself is excluded, by appending a slash "/" to the "root" parameter. If you want to include it, set noslash=yes.
search-break=yes will insert a break between the search bar and search button. The default is no.
can be used to change the width of the text field, in characters. The default is 22, which fits the search bar with the default box width. Note: this is a bare number with no units.
can be used to change the text on the search button. The default is "Search".


{{search box |root=Wikipedia:FAQ |search-button-label=Search the FAQ}}

Example 2:

{{search box
 |search-button-label=Search 84user's pages

Templates to search Wikipedia[edit]

Search links[edit]

A search link stores a query in a link that takes you to live search results for that stored search. They're found on user pages and talk pages and are used to create ad hoc search links from a preview. The plain wikilink [[Special:Search/query]] works just like the search box, so it will navigate to a page instead of providing the desired search results page that a search link always provides.

A search link is made by a template that outputs a URL instead of a wikilink. A template can specialize, save typing, hide implementation, and add value to existing Search features. A URL brings a useful set of additional features to search links. Besides being universal and uniform, a URL can call up other search processing and pass parameters. For example it can call other search engines to search Wikipedia. Also template programmers can use a URL to bring arcane or beta features to normal users. For example there are many URL-only tweaks offered for the morelike operator of CirrusSearch.

  • {{search link}} – create a search in a shareable link. Pick one or more namespaces, else it defaults to article space; pick a link title.
{{search link|tosa diary -"tosa diary"|"tosa" and "diary", but not "tosa diary"}}
"tosa" and "diary", but not "tosa diary".
  • {{Regex}} - develop a general regexp search.
{{regexp|\<--.*-->|label = Articles with hidden comments in the wikitext |prefix=0 }}
Articles with comments missing the bang ! in their syntax.
  • {{tlusage}} - develop a template regexp search, and pinpoint specific template-call details.
{{tlusage|Convert|\{{!}}C\{{!}}F|0|Articles that convert Celsius to Farenheight}}
Articles that convert Celsius to Farenheight
  • {{shortSearch}} - create three search links: Wikipedia and Google, plus create another link that's purely-Google.
{{shortSearch|system operations research}}
  • {{wpsearch}} – creates five search links: Wikipedia, Google, Bing, DuckDuckGo, and Yahoo
{{wpsearch|collaborative search}}
global warmingWikipedia search | Google search | Bing search | DuckDuckGo search | Yahoo search

Search boxes[edit]

Search boxes are made by <inputbox> tags. See mw:Extension:InputBox.

Page title searches[edit]

  • {{in title}} – Search for pages whose name contains given words
  • {{look from}} – Search for pages whose name begins with a given word

For searches with exact matches, exact in upper and lower cases, or in punctuation marks, see Help:Searching#grep.

Other Wikipedia editor helper[edit]

See also