Widget:HtmlImageMap: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This widget | This widget maps coordinates cleanly without breaking standard wiki variables. | ||
Usage: | Usage: | ||
{{#widget:HtmlImageMap | {{#widget:HtmlImageMap | ||
|image=YourImageFileName.png | |image=YourImageFileName.png | ||
|width= | |width=960 | ||
|mapname=sandboxmap | |mapname=sandboxmap | ||
|areas= | |areas=rect 328,88,460,244 https://sandbox.umd.edu Electronics | ||
}} | }} | ||
</noinclude> | </noinclude> | ||
<includeonly> | <includeonly> | ||
<!-- | <!-- Dynamically grab your wiki image file path --> | ||
<img src="{{canonicalurl:Special:FilePath/{$image}}}" width="{$width| | <img src="{{canonicalurl:Special:FilePath/{$image}}}" width="{$width|default:960}" usemap="#{$mapname|default:floorplan}" alt="Makerspace Map"> | ||
<map name="{$mapname| | <map name="{$mapname|default:floorplan}"> | ||
<!-- We pull the data straight out of the plain text parameter --> | |||
<!-- Using custom inline elements prevents Smarty engine syntax leakage --> | |||
{$areas|validate:''} | |||
</map> | </map> | ||
</includeonly> | </includeonly> | ||
Revision as of 22:57, 13 October 2026
This widget maps coordinates cleanly without breaking standard wiki variables.
Usage: