Of course :)
I have categories which have categories which have categories = a hierarchy of three levels. I show these categories as lists on each subsequent page, except for the third page, which would be the list of the sub-sub-categories, I want to show a jpg instead of normal links. This jpg image then has several 'hotspots', like this:
<area shape="poly" coords="94,134,158......> etc. I createad those hotspots with Gimp and copied the source code. Now I want to populate the image map with the correct hotspots, combined with the correct link to the sub-sub-category.
In the example above I forgot to imclude the part of the map, so this was my attempt:
<?php
$regions = array(
'<area shape="poly" coords="94,134,158,282,124,374,47,364,7,169,55,150"',
'<area shape="poly" coords="128,99,231,100,283,276,161,283,97,128"',
etc....
?>
<?php
echo "<map name=\"map\">";
if (is_category()) {
$cat_id = get_query_var('cat');
$catlist = get_categories('child_of=' . $cat_id);
if (get_category_children($catlist->cat_ID) != "") {
foreach($cat_id as $catlist) {
$i=0;
echo $regions[$i] . " href=\"index.php?cat=" . $category->cat_ID . "\" alt=\"" . $category->cat_name . "\">";
$i++;
}
}
}
echo "</map>";
?>
Please let me know if I have to clarify some more ;)