- Variable: $ beginning, the first character must be a letter $ name => xiaoming
- Segmentation: {} , and the divided character string variable, $ {name} hello => xiaominghello
- Disclaimer: #set , #set ($ NUM = 0)
- Import Script: #parse (file path) public partial import
#parse("views/dspadvert/common/body_footer.vm")
- Double and single quotation marks, " $ name " => Xiaoming, ' $ name ' => '$ name'
- Script logo statement: #
#foreach($info2 in $basicInfo2) <li class="otherinfo-list"> $info2.value </li> #end
- Conditional statements
#if ($ isHezhuo) ## partners: APP diversion #set ($ linkFlag = "appdl") #set ($ linkText = $ Phone) #ElseIf ($ protectmp == "11" || $ protectmp == " 12 ") #set ($ linkFlag =" sjbh ") #set ($ linkText =" Privacy has enabled ") #else #set ($ linkFlag =" Phone ") #set ($ linkText =" $ Phone ") # end
- Notes: ## single-line comments # * . . . . * # Multiline comment
- Forced to nonexistent variables into empty: !
#if($!guohufeiyong != "" && $!guohufeiyong == "53")
Velocity common grammar
Guess you like
Origin www.cnblogs.com/longlongdan/p/11057846.html
Ranking