帝国cms灵动标签调用上一章和下一章文章名称
2022-12-05
帝国cms内容页上下页的链接有标签可以直接用,但如果要调用上一章的名称和下一章的名称却发现没有标签可以用,下面说下怎样用灵动标签来调用章节名。
上一章节:
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id desc limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id desc limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
下一章节:
[e:loop={"select * from [!db.pre!]ecms_news where id>'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
这里用了news表,要把news改成你要查询的表明,这样就把帝国模板上个章节和下个章节的文章名弄出来了。
上一章节:
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id desc limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id desc limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
下一章节:
[e:loop={"select * from [!db.pre!]ecms_news where id>'$navinfor[id]' and classid='$navinfor[classid]' and checked=1 order by id limit 1",1,24,0}]
<a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>" target="_blank"><?=$bqr[title]?></a>
[/e:loop]
这里用了news表,要把news改成你要查询的表明,这样就把帝国模板上个章节和下个章节的文章名弄出来了。
声明:本文来自用户分享和网络收集,仅供学习与参考,测试请备份。