一: 动态调用上一篇下一篇链接
上一篇 动态调用上一篇链接
下一篇 动态调用下一篇链接
二: 灵动标签和sql语句调用
上一篇链接:
[e:loop={"select id,classid,newspath,filename,groupid,titleurl from [!db.pre!]ecms_".$class_r[$navinfor[classid]]['tbname']." where id<".$navinfor[id]." and classid=".$navinfor[classid]." and checked=1 order by id desc limit 1",1,24,0}]
下一篇链接:(把小于号改成大于号)
[e:loop={"select id,classid,newspath,filename,groupid,titleurl from [!db.pre!]ecms_".$class_r[$navinfor[classid]]['tbname']." where id>".$navinfor[id]." and classid=".$navinfor[classid]." and checked=1 order by id desc limit 1",1,24,0}]
三: 运用灵动标签调用,比较简洁的方式
[e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}]
">上一篇:=$bqr[title]?>
[/e:loop]
[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}]
">下一篇:=$bqr[title]?>
[/e:loop]
四: 控制上一篇下一篇标题字数截取30个字符为例
运用:=esub($bqr[title],30)?>
[e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}]
">上一篇: =esub($bqr[title],30)?>
[/e:loop]
[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}]
">下一篇:=esub($bqr[title],30)?>
[/e:loop]
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: 帝国CMS内容页调用上一篇 下一篇的几种写法