Widget:HtmlImageMap: Difference between revisions

From sandbox
Jump to navigation Jump to search
Gfc (talk | contribs)
No edit summary
Gfc (talk | contribs)
No edit summary
Line 6: Line 6:
|width=960
|width=960
|mapname=sandboxmap
|mapname=sandboxmap
|areas=rect 328,88,460,244 https://sandbox.umd.edu Electronics
|areas=<area shape="rect" coords="300,90,460,260" href="https://sandbox.umd.edu" title="Electronics">
}}
}}
</noinclude>
</noinclude>
<includeonly>
<includeonly>
<!-- Dynamically grab your wiki image file path -->
<!-- Dynamically grab your wiki image file path -->
<img src="{{canonicalurl:Special:FilePath/{$image}}}" width="{$width|default:960}" usemap="#{$mapname|default:floorplan}" alt="Makerspace Map">
<img src="{{canonicalurl:Special:FilePath/<!--{$image}-->}}" width="<!--{$width|default:960}-->" usemap="#<!--{$mapname|default:floorplan}-->" alt="Makerspace Map">


<map name="{$mapname|default:floorplan}">
<map name="<!--{$mapname|default:floorplan}-->">
<!-- We pull the data straight out of the plain text parameter -->
<!--{$areas}-->
<!-- Using custom inline elements prevents Smarty engine syntax leakage -->
{$areas|validate:''}
</map>
</map>
</includeonly>
</includeonly>

Revision as of 22:59, 13 October 2026

This widget maps coordinates cleanly without breaking standard wiki variables. Usage: Makerspace Map