Velocity多重if else判定

3697 ワード

<div id="contentAreaDiv" class="fenlei_bg" style="overflow: hidden;">
		<!---------------------- DIV----------------------------------->
		<div id="contentMask" class="stayInAreaDiv brightblue18 size16" style="overflow: hidden;height: 385px;">
            <div id="districtAreaDiv">
            	<ul>
				#foreach($!district in $!districts)
					#if($!{district.length()} > 9)
                    	<li style="line-height:24px;">$!{district}</li>
					#else
                    	<li>$!{district}</li>
					#end
					#if($!velocityCount % 2 == 0)
						</ul>
						<ul>
					#end
				#end
                </ul>
            </div>
        </div>
		
		<!---------------------- DIV----------------------------------->
		<div id="contentMask2" class="stayInAreaDiv brightblue18 size16" style="overflow: hidden;height: 385px;display:none;">
            <div id="commericalLocationAreaDiv">
            	<ul>
				#foreach($!commericalLocation in $!commericalLocations)
					#if($!{commericalLocation.length()} > 9)
                    	<li style="line-height:24px;">$!{commericalLocation}</li>
					#else
                    	<li>$!{commericalLocation}</li>
					#end
					#if($!velocityCount % 2 == 0)
						</ul>
						<ul>
					#end
				#end
                </ul>
            </div>
        </div>
			
		<!---------------------- DIV----------------------------------->
		<div id="contentMask3" class="stayInAreaDiv brightblue18 size16" style="overflow: hidden;height: 385px;display:none;">
            <div id="landmarkLocationAreaDiv">
            	<ul>
				#foreach($!landmarkLocation in $!landmarkLocations)
					#if($!{landmarkLocation.length()} > 9)
                    	<li style="line-height:24px;">$!{landmarkLocation}</li>
					#else
                    	<li>$!{landmarkLocation}</li>
					#end
					#if($!velocityCount % 2 == 0)
						</ul>
						<ul>
					#end
				#end
                </ul>
            </div>
        </div>
			
		<!---------------------- DIV----------------------------------->
		<div id="contentMask4" class="stayInAreaDiv brightblue18 size16" style="overflow: hidden;height: 385px;display:none;">
            <div id="brandAreaDiv">
            	<ul>
				#set($brandIndex=1)
				#foreach($!brand in $!brandList)
					#if($!{brand.name} != "")
    					#if($!{brand.name.length()} > 9)
                        	<li brandId="$!{brand.brandId}" style="line-height:24px;">$!{brand.name}</li>
    					#else
                        	<li brandId="$!{brand.brandId}">$!{brand.name}</li>
    					#end
    					#if($!brandIndex % 2 == 0)
    						</ul>
    						<ul>
						#end
						#set($brandIndex=$brandIndex+1)
					#end
				#end
                </ul>
			</div>
        </div>
	</div>