Jump to content

User:Davidwr/Wikisearchbox

From Wikipedia, the free encyclopedia
Related searches
  Search for: search_1
  Search for: search_2
  Search for: search_3
  Search for: search_4

The Template:Wikisearchbox generates a box in the style of an infobox (as show at right) with search-links for up to 9 text phrases to be found by wiki-search of the Wikipedia articles.

Examples:

{{Wikisearchbox|The Beatles}}
{{Wikisearchbox|text=The Beatles}}
{{Wikisearchbox|text=John Lennon|text2=Paul McCartney}}
{{Wikisearchbox|text=John|text2=Paul|text3=George|text4=Ringo}}
{{Wikisearchbox|text=Beatles%22+%22Rolling Stones}}

The parameters are:

  • title = Xxx Yzz   - top title of the generated search box.
  • title_bgcolor = "#AA6633" - background color of title (default: #E5E5E5)
  • title_style = xxx  - custom title style="{{{title_style}}}"
(such as: title_style = font-size:92%; margin-left:20px;)
  • box_width=230px  - width of the generated box (default: 190px).
{{Wikisearchbox|text=John Lennon|text2=Paul McCartney}}
  • text   = xxx xxx  - 1st text in "Search for: xxx xxx"
  • text2 = xxx xxx   - 2nd text in "Search for: xxx xxx"
  • text3 = xxx xxx   - 3rd text in "Search for: xxx xxx"
  • text9 = zzz zzz   - 9th text in "Search for: zzz zzz"
(Any of the 8 other text phrases, such as text7 can be omitted.)

To search multiple phrases at the same time, put "%22+%22" separating the phrases:

{{Wikisearchbox|text=apples%22+%22oranges%22+%22pears}}
{{Wikisearchbox|Beatles%22+%22Rolling Stones}}
{{Wikisearchbox|Beatles%22+%22Stones | title=Combined search|title_bgcolor=Beige}}
{{Wikisearchbox|text=Beatles%22+%22Stones | title=Combined search|title_bgcolor=Beige}}

Parameter name "text=" can be omitted since it is parameter 1.

The width of the box might expand beyond box_width, if long words appear in the title or any of the text-phrase parameters.

For more than 9 phrases, use the template again, and stack the boxes down the right-side margin. The next title can be set to blank by using "title= ".