Template:google

Hello, you have come here looking for the meaning of the word Template:google. In DICTIOUS you will not only get to know all the dictionary meanings for the word Template:google, but we will also tell you about its etymology, its characteristics and you will know how to say Template:google in singular and plural. Everything you need to know about the word Template:google you have here. The definition of the word Template:google will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofTemplate:google, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Wiktionary has built-in support for links to Google Web Search results, but this support is a bit buggy, because it's hacked onto support for interwiki links. (Most notably, it changes spaces to underscores in the link, like in Wiktionary article titles; this alters how Google performs its searches. Also, the built-in support doesn't allow any way to include | or OR in searches.) This template offers a better alternative.

Usage

The template is used rather like the built-in support. The first argument is mandatory; it indicates the string to search for. The second argument is optional; if included and non-blank, it indicates the link text. If the second argument is blank, then the first argument is used for this as well. If the second argument is omitted entirely, then "google:" plus the first argument is used for this:

Search type

Unlike the built-in support, the template also supports an optional {{{type}}} parameter:

As above, a second unnamed parameter may be included, with the same functionality as above.

Pipes in search queries

A Google search query can include the pipe character |, which serves to indicate a logical disjunction; for example, a Google search for yes|no will pull up pages that contain either the word yes or the word no (or both). However, the pipe character has meaning to the MediaWiki syntax (it's used to separate template parameters), so care is needed.

This does not work: {{google|yes|no}}no
This works: {{google|yes OR no}}google:yes OR no
(This is a feature of Google: uppercase OR is equivalent to |.)
This works: {{google|yes{{!}}no}}google:yes|no
(This uses Wiktionary's {{!}} template.)
This does not work: {{google|yes<nowiki>|</nowiki>no}}google:yes|no
This does not work: {{google|yes&#x7C;no}}google:yes|no
This does not work: {{google|yes%7Cno}}google:yes%7Cno
This does not work: {{google|yes&#124;no}}google:yes|no

Note that none of the above approaches works with the built-in support; for example, ] produces no.

Number of results per page

The optional {{{num}}} parameter may be used to specify a number of results per page; for example, {{google|search string|num=30}} links to http://www.google.com/search?q=search+string&num=30, which shows the first thirty search results.

However, this parameter should be used with care, since it would override any setting the user may have configured in his or her Google preferences.

See also