I'm trying to create a nested if condition using velocity template. I am not sure if it is right. Please give the suggestions if it works or not..!!
#if(myExpression1)
#if(myExpression2)
Result 1
#else
Result 2
#end
#else
Result 3
#end
I'm trying to create a nested if condition using velocity template. I am not sure if it is right. Please give the suggestions if it works or not..!!
#if(myExpression1)
#if(myExpression2)
Result 1
#else
Result 2
#end
#else
Result 3
#end
Copyright © 2021 Jogjafile Inc.
Yes this works. You can nest an if within an if. Just make sure that all
#ifstatements are closed with an#endThere are some examples of nested statements within default hybris. For example in
copyable-template.vmFor simplicity, I've removed some of the code and only left the # statements in