欢迎来到 XIYCMS内容管理系统 · 企业版免费下载,永久授权
首页 / 技术知识 / 使用技巧/xiycms如何实现内容的上一页、下一页
ARTICLE

xiycms如何实现内容的上一页、下一页

发布:1577531654 作者:XIYCMS内容管理系统 人气:246 栏目:使用技巧

1.上一篇、下一篇:

{rs id="rs" top="1" table="xiy_content" where="classid in ($sonid) and islock=0 and id<$id" order="id desc"}            上一篇:{:getSubstr($rs.title,0,40)}{/rs}{rs id="rs" top="1" table="xiy_content" where="classid in ($sonid) and islock=0 and id>$id" order="id asc"}            下一篇:{:getSubstr($rs.title,0,40)}{/rs}

2.上一篇、下一篇对应css:

.xiycms-pagepn { height: auto; line-height: 50px; border-top: 1px solid #EAEAEA; border-bottom: 1px solid #EAEAEA; margin:30px 0;}.xiycms-pagepn a { width: 45%; word-wrap: normal;  text-overflow: ellipsis; white-space: nowrap; overflow: hidden; display: block; }.xiycms-pagepn a.l{float:left;}.xiycms-pagepn a.r{float:right;}