Announcement

Collapse
No announcement yet.

Can't find ProductImageWidth

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

    Can't find ProductImageWidth

    Hi,

    I've been looking for about a hour now and I just can't seem to find it. How do I change the value of the variable ProductImageWidth in the Standard Product Image layout?

    Sorry if it's obvious, but I just can't find it!

    Raj

    #2
    You can't change its value. The value of that variable is the width of the current product image.

    If you explain what you are trying to achieve that may help.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks Norman. That explains it!

      I thought I would be able to set this value and then whatever image I used, it would resize to this value.

      Comment


        #4
        You can replace the variable in the layout with a fixed value of width or height. This would then scale the image on the page - it doesn't resize it in terms of file size of course.

        You might want to consider resizing and optimising your images in bulk instead as you will then benefit from decreased file size and therefore increased download speed.

        Comment


          #5
          As Duncan says, you just use a number in place of the variable. Also leave out the height attribute or you'll end up with a crazy aspect ratio:
          Code:
             <img src="<actinic:variable name="ProductImageFileName" />"
                border="0"
                width="50"
                alt="<actinic:variable name="ProductName" encoding="strip"/>" />
          Here's a little enhancement that shows small icons that enlarge while the mouse is over them.
          Code:
             <img src="<actinic:variable name="ProductImageFileName" />"
                border="0"
                width="50"
          	  onmouseover="this.width=<actinic:variable name="ProductImageWidth" />;"
          	  onmouseout="this.width=50;"
                alt="<actinic:variable name="ProductName" encoding="strip"/>" />
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment

          Working...
          X