Difference between revisions of "Template:Tooltip hover box/doc"
old>Realpsojed (Rewritten help for templates and pages.) |
old>Realpsojed (Expanded with TOC, examples and links to pages that use Tooltip hover box and different examples.) |
||
Line 1: | Line 1: | ||
{{Doc/start}} | {{Doc/start}} | ||
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 | 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 | 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): | ||
<nowiki>{{ {{{1|Tooltip hover box}}} | <nowiki>{{ {{{1|Tooltip hover box}}} | ||
Line 9: | Line 9: | ||
}}</nowiki> | }}</nowiki> | ||
__TOC__ | |||
==Examples== | |||
===Simply adding text=== | |||
<nowiki>{{ {{{1|Tooltip hover box}}} | <nowiki>{{ {{{1|Tooltip hover box}}} | ||
|title= My page | |title= My page | ||
Line 24: | Line 28: | ||
If you | ===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]] page: | |||
<nowiki>{{ {{{1|Tooltip hover box}}} | |||
|title= {{:Vision}} | |||
}}</nowiki> | |||
{{ {{{1|Tooltip hover box}}} | |||
|title= {{:Vision}} | |||
}} | |||
===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: | |||
<nowiki>{{ {{{1|Tooltip hover box}}} | <nowiki>{{ {{{1|Tooltip hover box}}} | ||
Line 35: | Line 51: | ||
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 | ===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. | |||
<nowiki>{{ {{{1|Tooltip hover box}}} | <nowiki>{{ {{{1|Tooltip hover box}}} | ||
Line 44: | Line 61: | ||
|title={{Quote|Be yourself; everyone else is already taken.|Oscar Wilde}} | |title={{Quote|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]]. | For more help, please use the discussion for this template [[:Template_talk:Tooltip hover box]]. | ||
{{Doc/end}} | {{Doc/end}} |
Revision as of 15:02, 27 May 2020
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 page:
{{ {{{1|Tooltip hover box}}} |title= {{:Vision}} }}
The maximum radius of your vision range.
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}} }}
This article is a stub. You can help Stoneshard wiki by expanding it. |
“ | Tooltip hover box | „ |
Acquired From
See also
|
|
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.