Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Image Maps


7 Posts   1222 Views


28 October 2010 at 10:12am Community Member, 4 Posts

Image Maps

Why wont my image map work in a page? The html seems OK (see below) but I will be blowed if I can get it working.

<img class="left" src="assets/Uploads/Welcome.png" alt="Course Schedule" width="300" height="300" usemap="#Welcome" Title=""/></p>
<map name="Welcome">
<area shape="rect" coords="68,5,230,54" href="" target="_blank" alt="Welcome" />
<area shape="rect" coords="65,65,233,181" href="" target="_blank" alt="Saturday" />
<area shape="rect" coords="61,196,236,295" href="" target="_blank" alt="Sunday" />



Ryan M.

28 October 2010 at 11:58am Community Member, 309 Posts

What exactly are you having problems with? Are the maps un-clickable, or does it seem off, or what?


29 October 2010 at 12:04am Community Member, 4 Posts

Hi Ryan M

When I hover the mouse over the cursor does not change and click on the map it does not work at all.



29 October 2010 at 7:13am Community Member, 26 Posts

Your code appears to work when I pasted it into editor and viewed it. How are you adding the code to the page?


29 October 2010 at 12:29pm Community Member, 712 Posts

It could be caused by hashlink rewriting - another piece of SSViewer magic that can get in the way some times. Try adding this to _config.php:

SSViewer::setOption('rewriteHashlinks', false)


2 November 2010 at 3:30am Community Member, 4 Posts


The problems I had was when I was using the code in a site on locahost when usingthe exact same code on a site on a server on a hosting service it worked!

I did not do anything different so is it something about using it on localhost?


Ryan M.

2 November 2010 at 10:42am Community Member, 309 Posts

Depends on how your local .htaccess file is setup, and if you're including the base href tag in your template.

For example, my local .htaccess requires an URL rewrite in the style of http://localhost:8888/ProjectName/silverstripe directory here...