帝国CMS自带模板变量

上一篇:[!--info.pre--]

下一篇:[!--info.next--]

缺点:[!--info.pre--] 和 [!--info.next--] 中封装的 <a>标签的内容无法定制

灵动标签+SQL语句

[e:loop={"select*from[!db.pre!]ecms_newswhereid<'$navinfor[id]'andclassid='$navinfor[classid]'orderbyiddesclimit1",1,24,0}]上一篇:<ahref="<?=$bqsr[titleurl]?>"title="上一篇:<?=$bqr[title]?>"target="_blank">&#9756;&nbsp;</a>[/e:loop][e:loop={"select*from[!db.pre!]ecms_newswhereid>'$navinfor[id]'andclassid='$navinfor[classid]'orderbyidlimit1",1,24,0}]下一篇:<ahref="<?=$bqsr[titleurl]?>"title="下一篇<?=$bqr[title]?>"target="_blank">&#9758;</a>[/e:loop]

纯灵动标签

[e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','iddesc'}]<ahref="<?phpecho$bqsr[titleurl];$pre='true';?>">上一篇:<?=$bqr[title]?></a>[/e:loop]<?phpif(empty($pre)){echo"上一篇:很抱歉没有了";}?>[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','idasc'}]<ahref="<?phpecho$bqsr[titleurl];$next='true';?>">下一篇:<?=$bqr[title]?></a>[/e:loop]<?phpif(empty($next)){echo"下一篇:很抱歉没有了";}?>

动态调用

<ahref="/e/public/GotoNext?classid=[!--self.classid--]&id=[!--id--]&enews=pre">上一篇文章</a><ahref="/e/public/GotoNext?classid=[!--self.classid--]&id=[!--id--]&enews=next">下一篇文章</a>

声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:312334557@qq.com 我们将配合处理!

原文地址:《帝国CMS模板上下翻页页码有哪些方法》发布于2022-10-08 14:17:37