Difference between revisions of "Template:With-desc"

From Archiveteam
Jump to navigation Jump to search
(strange bug with tables)
 
(One intermediate revision by the same user not shown)
Line 20: Line 20:


The dotted underline is not because its beautiful, but to indicate that it's worth to hover above the text (it has a description).
The dotted underline is not because its beautiful, but to indicate that it's worth to hover above the text (it has a description).
'''Bug:''' For some reason, if you use it in a table, you may need to start a new line after this template for the other cells in that row.
</noinclude>
</noinclude>
<includeonly>
<includeonly><span title="{{{2}}}" style="border-bottom: 1px dotted">{{{1}}}</span></includeonly>
<span title="{{{2}}}" style="border-bottom: 1px dotted">{{{1}}}</span>
</includeonly>

Latest revision as of 16:32, 8 June 2015

This template prints its first parameter with a tooltip set in its second parameter.

Example:

{{with-desc|Yahoo!|It sucks.}}

Hover your mouse above: Yahoo!

Most useful if you want an item have a description in a table with many columns. Saves space.

You can use it also in wikilinks, in this case let it be the second parameter of the wikilink (the shown text):

[[Yahoo!|{{with-desc|Yahoo!|It sucks.}}]]

Result: Yahoo!


Do not use double quotes (") in any of the parameters (breaks the code). Use single quotes (') instead.

The dotted underline is not because its beautiful, but to indicate that it's worth to hover above the text (it has a description).

Bug: For some reason, if you use it in a table, you may need to start a new line after this template for the other cells in that row.