Developer forum

Forum » Templates » CustomFields If defined/ if Not (eCom)

CustomFields If defined/ if Not (eCom)


Reply
Hi,

im trying to show a image en a pdf is associated with the product - and if not associated, then show a transparent. png. But without any luck...

Code look like this:

<!--@If Defined(Ecom:Product:Field.ProductSheet.Value.Clean)-->
<a href="Files/<!--@Ecom:Product:Field.ProductSheet.Value.Clean-->"><img src="/files/system/pdf.gif" border="0" alt="pdf" /></a>
<!--@EndIf (Ecom:Product:Field.ProductSheet.Value.Clean)-->
<!--@If Not Defined(Ecom:Product:Field.ProductSheet.Value.Clean)-->
<img src="/files/system/x.gif" border="0" alt="" />
<!--@EndIf (Ecom:Product:Field.ProductSheet.Value.Clean)-->

http://ericstorm.net.dynamicweb.dk/da-DK/Produkter.aspx?GroupID=GROUP5

All help is appreciated ;-)

Replies

 
Nicolai Høeg Pedersen
Reply
Seems like you have "EndIf (.." and not "EndIf(.." - a space too much...
 
Reply
Think I need glasses, hadn't seen the blank space ;-)
Once again thanks a lot, Nicolai!

Best regards
Dennis

 

You must be logged in to post in the forum