Forums / Basic Configuration / 2 links on the Banner?

2 links on the Banner?

Locked

Views: 1,361

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
7 Mar 2010, 2:43 PM
#1
sevenhelmets avatar

sevenhelmets

New Zenner

Join Date:
Oct 2009
Location:
Tokyo, Japan
Posts:
52
Plugin Contributions:
0

2 links on the Banner?

Hi guys, me again.

My question is - what is the best way to implement an image map (various parts of an image can link to different URLs) for the banner at the very top of the site?

Currently, regardless of WHERE you click on the banner, it will normally take you back to the homepage.

I wish to have a** section** of the banner **also **link to an inner page, so therefore I need to create an image map. This way, one section links back to the homepage, and the other section links to the inner page.

I understand that the file I need to edit will be tpl_header.php, and the specific area will be around:

<!--bof-branding display-->
<div id="logoWrapper">
    <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>

and I'm guessing more specifically at

<?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'

but after this I'm a little lost. I can create the map in Dreamweaver, and copy the code into tpl_header.php, but I'm a little unsure HOW to put it in to integrate with the exsisting link.

Any suggestions?

7 Mar 2010, 3:35 PM
#2
sevenhelmets avatar

sevenhelmets

New Zenner

Join Date:
Oct 2009
Location:
Tokyo, Japan
Posts:
52
Plugin Contributions:
0

Re: 2 links on the Banner?

Once again I'll answer my own question. I hacked this, so it's not the prettiest code around, but it works:

<!--bof-branding display-->
<div id="logoWrapper">
    <div id="logo"><?php echo '<a href="http://www.YOURSITEHOMEPAGELINK.com"><img src="/includes/templates/YOUR_TEMPLATE/images/logo.gif" alt="YOUR ALT TEXT" width="968" height="100" border="0" usemap="#Map" /></a>
<map name="Map" id="Map">
  <area shape="circle" coords="917,50,49" href="http://www.YOURSITE.com/SECONDLINK" alt="YOUR ALT TEXT" /></map>'; ?></div>

Of course the map coordinates will differ depending on your own graphic, but this works.