欢迎您光临自学哈网,只为分享网络知识教程,供大家学习参考!

「自学哈网」帝国CMS模板内容页上下翻页页码调用方法集合

作者 : 自学哈 本文共1231个字,预计阅读时间需要4分钟 2022-11-26 共139人阅读
也想出现在这里? 联系我们

帝国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">☜&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">☞</a>
[/e:loop]

纯灵动标签


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

本站声明:
本站所有资源来源于网络,分享目的仅供大家学习和交流!如若本站内容侵犯了原著者的合法权益,可联系邮箱976157886@qq.com进行删除。
自学哈专注于免费提供最新的分享知识、网络教程、网络技术的资源分享平台,好资源不私藏,大家一起分享!

自学哈网 » 「自学哈网」帝国CMS模板内容页上下翻页页码调用方法集合
也想出现在这里? 联系我们
© 2022 Theme by - 自学哈网 & WordPress Theme. All rights reserved 浙ICP备2022016594号