帝国cms上一篇下一篇用灵动标签怎么调用?
帝国cms灵动标签调用上一篇[!–info.pre–]下一篇[!–info.next–]文章,灵活性比原帝国cms标签调用更方便。
方案一:
- [e:loop={“select * from [!db.pre!]ecms_news where id<‘$navinfor[id]’ and classid=’$navinfor[classid]’ order by id desc limit 1”,1,24,0}]
- 上一篇:<li><a href=“<?=$bqsr[titleurl]?>” title=“上一篇:<?=$bqr[title]?>” target=“_blank”><?=$bqr[title]?></a></li>
- [/e:loop]
- [e:loop={“select * from [!db.pre!]ecms_news where id>’$navinfor[id]’ and classid=’$navinfor[classid]’ order by id limit 1”,1,24,0}]
- 下一篇:<li><a href=“<?=$bqsr[titleurl]?>” title=“下一篇<?=$bqr[title]?>” target=“_blank”><?=$bqr[title]?></a></li>
- [/e:loop]
方案二:
- <li>[e:loop={‘selfinfo’,1,0,0,‘id<‘.$navinfor[id].”,‘id desc’}]
- <a href=”<?php
- echo $bqsr[titleurl];
- $pre=‘true’;
- ?>”>上一篇:<?=$bqr[title]?></a>
- [/e:loop]
- <?php
- if(emptyempty($pre)){
- echo “上一篇:很抱歉没有了”;
- }
- ?></li>
- <li>[e:loop={‘selfinfo’,1,0,0,‘id>’.$navinfor[id].”,‘id asc’}]
- <a href=”<?php
- echo $bqsr[titleurl];
- $next=‘true’;
- ?>”>下一篇:<?=$bqr[title]?></a>
- [/e:loop]
- <?php
- if(emptyempty($next)){
- echo “下一篇:很抱歉没有了”;
- }
- ?></li>
以上就是关于帝国cms常见问题中”帝国cms上一篇下一篇用灵动标签怎么调用?”的全部内容