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 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>
为什么如果我不在上一页中加入 ,当页面为第一页时,不显示下一页点击的内容。但是当我点到最后一页,有上一页的内容让我点击?