首页 新闻 会员 周边 捐助

NVelocity上一页和下一页的诡异问题。

0
悬赏园豆:5 [已关闭问题] 关闭于 2016-02-18 11:47
 1 <div class="TagBox mt-20 mb-30 clearfix ofh">
 2     <p class="mt-10">TAG</p>
 3     <div class="hr"></div>
 4         #set($sid=$cms.ExecuteScalar("SELECT * FROM CMSBase_Content where NodeID = $ccon.NodeID and [Status]=100 and Id<$con_id ORDER BY Id DESC"))
 5     #set($xid=$cms.ExecuteScalar("SELECT * FROM CMSBase_Content where NodeID = $ccon.NodeID and [Status]=100 and Id>$con_id ORDER BY Id asc"))
 6                            
 7     #set($sidcount=$cms.ExecuteScalar("SELECT count(*) FROM CMSBase_Content where NodeID = $ccon.NodeID and [Status]=100 and Id<$con_id"))
 8     #set($xidcount=$cms.ExecuteScalar("SELECT count(*) FROM CMSBase_Content where NodeID = $ccon.NodeID and [Status]=100 and Id>$con_id"))
 9                            
10     <div class="nPgaeUD ofh">
11         <div class="left w100">
12             <div class="pre ofh">
13                     #if($sidcount==0)
14                     &nbsp;
15                     #else
16                     #foreach($Scon in $cms.GetContents($ccon.NodeID,1,"CMSBase_Content.Id=@Sid","@Sid:$sid",""))
17                     <a href="/detail.aspx?cid=$sid"><i class="icon left mr-20"></i>$cms.Cut($Scon.Title,20,"...")</a>
18                     #end
19                     #end
20             </div>
21         </div>
22         <div class="next left ofh">
23                     #if($xidcount==0)
24                                            
25                     #else
26                     #foreach($Xcon in $cms.GetContents($ccon.NodeID,1,"CMSBase_Content.Id=@Xid","@Xid:$xid",""))
27                     <a href="/detail.aspx?cid=$xid"><i class="icon right mr-20"></i>$cms.Cut($Xcon.Title,20,"...")</a>
28                     #end
29                     #end
30         </div>
31     </div>
32 </div>

为什么如果我不在上一页中加入&nbsp;,当页面为第一页时,不显示下一页点击的内容。但是当我点到最后一页,有上一页的内容让我点击?

随意听风的主页 随意听风 | 初学一级 | 园豆:23
提问于:2014-06-04 11:26
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册