Velocity的if...else

 #foreach($member in $members)
       $velocityCount
      

  • $member.email - $member.firstname $member.lastname

  •        #if($member.firstname=='gao1')
             congratulation!
           #else
             fail!
           #end
         #end 

    结果:

    List:

    [email protected] - gao1 xiang1 congratulation!  1 [email protected] - gao2 xiang2 fail! 2 [email protected] - gao3 xiang3 fail! 3
     

    你可能感兴趣的:(经验技巧之OpenSource)