Get our free book (in Spanish or English) on rainwater now - To Catch the Rain.

Template:Google custom/doc

From Appropedia
Jump to: navigation, search

Usage[edit]

Creates a Google custom search link, which searches one site (and, optionally, pages with URLs containing one directory path in the site). (If you want to search on the entire Web, use {{Google}} instead.) This template takes three unnamed input parameters; you must supply the first one, and the last two are optional.

  1. A domain name, and optionally the first part of directory path (to specify one part of the site to search). This parameter becomes the values of the sitesearch= and domains= parameters in the resulting search URL. If the value ends in a directory path component, it evidently must end with a complete path component. For Wikipedia URLs, this would be everything up to a slash or a colon (including or not including the slash or colon has no effect on the resulting search). (Required.) Examples:
    • en.wikipedia.org — (search all of the English Wikipedia)
    • en.wikipedia.org/wiki/Wikipedia:Help_desk — (search the English Wikipedia Help desk)
    • en.wikipedia.org/wiki/Help: — (search the English Wikipedia's Help: namespace)
    • en.wikipedia.org/wiki/Help_ — (generates a search link that does not work: try it, evidently because no Wikipedia page URLs contain the string with a colon or a slash immediately after it)
  2. Your search term(s). (Optional.) If this parameter is empty, clicking on the resulting link generates a Google search form with an initially blank input field, ready to search on the site the first parameter specifies.
  3. Link text to display on your wiki page. (Optional.)

Examples[edit]

To-do: edit the examples to emphasize Appropedia rather than Wikipedia.

Type this To get this What it produces, or searches for
{{google custom|en.wikipedia.org||Search Wikipedia}} Search Wikipedia Blank form to search Wikipedia
{{google custom|en.wikipedia.org|google|Search Wikipedia for "google"}} Search Wikipedia for "google" Search Wikipedia for "google"
{{google custom|en.wikipedia.org/wiki/Wikipedia:||Search Wikipedia's Wikipedia: namespace}} Search Wikipedia's Wikipedia: namespace Blank form to search the Wikipedia: namespace
{{google custom|en.wikipedia.org/wiki/Wikipedia:Help_desk||Search Wikipedia Help desk}} Search Wikipedia Help desk Blank form to search the Wikipedia Help desk
{{google custom|en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost||Search Wikipedia Signpost}} Search Wikipedia Signpost Blank form to search the Wikipedia Signpost
{{google custom|en.wikipedia.org/wiki/Category:||Search Wikipedia's Category namespace}} Search Wikipedia's Category namespace Blank form to search Wikipedia's Category: namespace
{{google custom|en.wikipedia.org/wiki/Help:||Search Wikipedia's Help: namespace}} Search Wikipedia's Help namespace Blank form to search Wikipedia's Help: namespace
{{google custom|en.wikipedia.org/wiki/Template:|google|Search Wikipedia's Template: namespace for "google"}} Search Wikipedia's Template: namespace for "google" Search Wikipedia's Template: namespace for "google"
{{google custom|meta.wikimedia.org||Search Meta-Wiki with Google}} Search Meta-Wiki with Google Blank form to search Meta-Wiki
{{google custom|www.mediawiki.org||Search MediaWiki.org with Google}} Search MediaWiki.org with Google Blank form to search MediaWiki.org
{{google custom|www.appropedia.org||Search Appropedia}} Search Appropedia Blank form to search Appropedia

For more usage notes and examples, see the template documentation on Wikipedia.

See also[edit]

External links[edit]

Wikipedia
This page or section includes content from Wikipedia. The original article was at Template:Google custom. The list of authors can be seen in the history for that page. As with Appropedia, the text of Wikipedia is available under the CC-BY-SA.