Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Location
    Tokyo, Japan
    Posts
    51
    Plugin Contributions
    0

    Default 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:

    Code:
    <!--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

    Code:
    <?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?

  2. #2
    Join Date
    Oct 2009
    Location
    Tokyo, Japan
    Posts
    51
    Plugin Contributions
    0

    Default 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:

    Code:
    <!--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.

 

 

Similar Threads

  1. Replies: 5
    Last Post: 3 Mar 2019, 04:25 PM
  2. Replies: 1
    Last Post: 30 Jun 2014, 04:55 PM
  3. Banner issue cannot rezise the banner.
    By headyntl in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Jan 2010, 01:04 AM
  4. Replies: 4
    Last Post: 4 Jun 2009, 06:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR