Announcement

Collapse
No announcement yet.

New Sections/Products .css image change

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

    New Sections/Products .css image change

    Hi All,

    I was wondering if someone could help/point me in the direction of enabling a variable that would float a small "tag" (image) in front of a product and or section image when a variable is selected that it is new.

    If a product was new it would have the regular image, however it would have an image/text over 1 side of it that just said "New!"

    I can do the .css but I can't workout how to incorporated that into a custom variable that calls it in if "yes" or "no" selected in the section options.

    Any ideas/help would be appreciated!

    G

    #2
    You use what are called Conditions in Actinicspeak. If you're variable is called "IsNew", and is of type True / False, then a bit of code like:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNew%22%20%2f%3e" >
    	Code to generate only if IsNew is set
    </actinic:block>
    This could be used like:
    Code:
    <div <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNew%22%20%2f%3e" >class="newproduct"</actinic:block> >
      IMAGE TAG HERE
    </div>
    Or in the Standard Product Imageproduct image layout like:
    Code:
       <img src="<actinic:variable name="ProductImageFileName" />"
         <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNew%22%20%2f%3e" >class="newproduct"</actinic:block> 
          border="0"
          width="<actinic:variable name="ProductImageWidth" />"
          height="<actinic:variable name="ProductImageHeight" />"
          title="<actinic:variable name="ProductName" encoding="strip"/>"
          alt="<actinic:variable name="ProductName" encoding="strip"/>" />
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you for a great reply as usual Norman!

      I did change the code slightly but your fix worked great.

      You can see it now in action here:

      http://www.95percentshop.co.uk/acata..._Cookware.html

      Thanks again.

      G

      Comment

      Working...
      X