Template:Tooltip hover box

From Stoneshard wiki
Jump to navigation Jump to search

Tooltip hover box

Template-info.png Documentation

This is a template created for use anytime you want to produce a pop-up mouseover tooltip. The tooltip automatically provides CSS styling and border similar to the in-game windows. Tooltip can display anything you write into the template, but our most common usage is to load another template filled with formatted data.

Usage: Create a new page, copy this code to the created page and fill in the parameters (or delete if you don't need both):

{{ {{{1|Tooltip hover box}}}
|title=
|body=
}}



Examples

Simply adding text

{{ {{{1|Tooltip hover box}}}
|title= My page
|body= <br>Lorem ipsum dolor sit..
}}

will produce this result:

My page
Lorem ipsum dolor sit..


Loading another page's contents

Instead of writing text, links, etc. into the template, you can load the contents of an existing page. For example, to display whatever is written on the Vision/Tooltip page:

{{ {{{1|Tooltip hover box}}}
|title= {{:Vision/Tooltip}}
}}

Tooltip hover box

Loading a part from another page's data structure

If you have a page that uses our data structure, you can load only a certain part of it. For example, if I wanted to load the weapon's description from the Templar Sword page, then I can call for this page's description data by using the page name as in the previous example and providing the appropriate parameter. In this case, we can simply call for the Description parameter:

{{ {{{1|Tooltip hover box}}}
|title= {{:Templar Sword|Description}}
}}


Loading a Template

Another option is to fill the tooltip box with another template. In this example, we will use the Template:Quote and fill in the values Quote and Author.

{{ {{{1|Tooltip hover box}}}
|title={{Quote|Be yourself; everyone else is already taken.|Oscar Wilde}}
}}
Be yourself; everyone else is already taken.
~ Oscar Wilde


All of the above

Templates are very powerful tools that can do more fancy stuff. Check out these wiki pages where the above examples are fused together: Templar Sword, Cleaving Strike, Agrimony, Bleeding.


For more help, please use the discussion for this template Template_talk:Tooltip hover box.