ASP.NET强大的模板引擎
先上前端HTML
<table width="300px" border="1" align="center" >
<tr>
<!--CMS action="LIST" return="List" NodeID="10,11" Num="$pathlist"-->
<!--{{foreach o in List}}-->
<!--{{if o@row ==1}}-->
<td align="center" height="90">
<!--{{if DCompare(o.DateLine,$[NowDate])==0}}-->
asdfasdfsadf
<!--{{endif}}-->
<a href="" target="_blank" >
<img src="/images/pic2.gif" border="0" >
</a>
<br>
<a href="" target="_blank" >{{Sub(o.title,0,5)}}</a>
</td>
<!--这里的5改为n可以实现一行显示n张图片-->
<!--{{elseif (o@row % 5) ==0}}-->
<td align="center" height="90">
<!--{{if DCompare(o.DateLine,$[NowDate])>0}}-->
asdfasdfsadf
<!--{{endif}}-->
<a href="" target="_blank" >
<img src="/images/pic2.gif" border="0" >
</a>
<br>
<a href="" target="_blank" >{{CSub(o.title,0,10)}} <!--{{Trim(o.title)}}--></a>
</td>
</tr><tr>
<!--{{else}}-->
<td align="center" height="90">
<!--{{if DCompare(o.DateLine,$[NowDate])>0}}-->
asdfasdfsadf
<!--{{endif}}-->
{{NowDate}}
<a href="" target="_blank" >
<img src="/images/pic2.gif" border="0" >
</a>
<br>
<a href="" target="_blank" >{{Sub(o.title,0,5)}} <!--{{Trim(o.title,"中")}}--></a>
</td>
<!--{{endif}}-->
<!--{{endfor}}-->
</tr>
</table>
效果图