Greetings, i'm using the if else statement to select which text to display. Below are my codes :
There are 3 types of values in my arrayList for the variable delivery: courier, mail or register mail. This is how i display the values #foreach ( $email in $orderList) $email.deliver (this code will display which type of delivery) #end So right now, i'm trying to display out some text which depends on which type of delivery. This is how i write in the velocity template #foreach ( $email in $orderList) #set($email.deliver = "courier") #if ($email.deliver) This is courier delivery #end #set($email.deliver = "mail") #if ($email.deliver) This is mail delivery #end #set($email.deliver = "register mail") #if ($email.deliver) This is reigister delivery #end However it displays all the 3 text even when i set the if statement. Where have i gone wrong? Thanks for the guidance in advance -- View this message in context: http://www.nabble.com/How-to-use-the-if-else-statement-in-velocity-tp17532430p17532430.html Sent from the Velocity - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
