Announcement

Collapse
No announcement yet.

Clickable images in fragments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Clickable images in fragments

    Using code kindly provided by a generous contributor to this forum, I have set up fragments (by amending "Image to left of Text") in a grid on my homepage (www.blueberrybarn.co.uk). The fragment consists of an image in a border with a brief description of the product, the price and a link to the product beneath. In Actinic the "link" tab is greyed out, as the link box isn't ticked, yet the image is clickable on the live website - and leads to a dead link. I would actually like the image to be clickable (and for it to lead to a live link!) but when I do this it actually duplicates the whole image etc underneath the existing one!! I wonder if anyone can see why this is happening.

    To further complicate the links to the product anchors don't seem to work (again) so that the links only take you to the top of the section page, rather than the actual product.

    #2
    Two things:
    1. You need to look again at the template changes made for the fragments (post it here if you're not sure) there's obviously something not quite right with it.
    2. The anchors don't appear to be in your Act_ProductLine template. Check that you have <a name="NETQUOTEVAR:PRODUCTANCHOR"></a> in that template.

    Comment


      #3
      You haven't posted the code you're using so we can only guess what you're trying to do.

      However I see
      Code:
      <a href="<IMG SRC="acatalog/A_Taste_of_the_Med_home.jpg" ALT="Hampers2" BORDER=0 HEIGHT=130 WIDTH=130 >
      <IMG SRC="acatalog/A_Taste_of_the_Med_home.jpg" ALT="Hampers2" BORDER=0 HEIGHT=130 WIDTH=130 >
      </a>
      in your generated pages. You seem to be using the image as the HREF, not the link.

      As for the links taking you to the top of the page this may be because you've erronously deleted NETQUOTEVAR:PRODUCTANCHOR from your product templates. Look at a clean template and restore the code that surrounds that tag.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        This is the code I am using for the grid-type fragments:

        <!-- LeftImage HTML begin -->

        <script language=JavaScript>
        <!--
        if ( currentcol++ == 0 ) document.write('<tr><td colspan=3><table border=0 cellpadding="5" cellspacing="1"><tr>');
        document.write('<td width="' + colwidth + '%" valign=top>');
        // -->
        </script>

        <noscript><tr><td width="100%"></noscript>

        NETQUOTEVAR:FRAGMENTANCHOR
        <table border="0" cellspacing="0" cellpadding="0">
        <tr>
        <td align="right">
        <table border="0" cellspacing="0" cellpadding="2" bgcolor="#8080ff">
        <tr>
        <td>
        <table border="0" cellspacing="0" cellpadding="4" bgcolor="#ffffff">
        <tr>
        <td>
        <table border="0" cellspacing="0" cellpadding="1" bgcolor="#0000cc">
        <tr>
        <td align="center" valign="middle">
        <table width="100%" border="0" cellspacing="0" cellpadding="3" bgcolor="white" height="100%">
        <tr>
        <td bgcolor="#ffffff"><a href="NETQUOTEVAR:BROCHURE_IMAGE NETQUOTEVAR:BROCHURE_IMAGE</a></td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        <table>
        <tr>
        <td valign="top" align="center"> NETQUOTEVAR:BROCHURE_TEXT</td>
        </tr>
        </table>

        </td>

        <script language=JavaScript>
        <!--
        if ( currentcol >= CUSTOMVAR:NUMCOLS )
        {
        document.write('</tr></table></td></tr>');
        currentcol = 0;
        }
        // -->
        </script>

        <noscript></tr></noscript>



        <!-- LeftImage HTML end -->


        I thought it might be something to do with this apparent duplication:

        <a href="NETQUOTEVAR:BROCHURE_IMAGE NETQUOTEVAR:BROCHURE_IMAGE</a></td>

        but if I remove one of the NETQUOTEVAR's it results in a border without any image at all!


        I have replaced the missing NETQUOTEVAR for the product anchor and that is working now, many thanks!

        Comment


          #5
          Thanks for pointing me in the right direction, I have removed the href tags and the image link works OK.

          Comment

          Working...
          X