Considering the following piece of code in a velocity template:
#set($brandName = $player.brand.name)
#set($brandNameExample = "NameExample")
#if($brandName == $brandNameExample)
11111
#else
22222
#end
I always get 22222
. Of course, player.brand.name = "NameExample"
.
Can anybody explain me why and how to get it work please?
Well I found the solution : I called twice to velocity : the first time without the player object and second one with it. So at the first call all directives concerning player could not be evaluated and returned null. Thank you all for your help