国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 帝國Empire > 正文

帝國CMS靈動標簽調(diào)用上一篇,下一篇方法

2024-07-09 22:50:59
字體:
供稿:網(wǎng)友

1)動態(tài)調(diào)用上一篇下一篇鏈接 

  1. <a href="[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=pre">上一篇</a>   動態(tài)調(diào)用上一篇鏈接 
  2. <a href="[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=next">下一篇</a> 動態(tài)調(diào)用下一篇鏈接 

2)運用靈動標簽和SQl語句調(diào)用

上一篇鏈接: 

  1. [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}] 
  2. <?php 
  3. $titleurl=sys_ReturnBqTitleLink($bqr); 
  4. echo $titleurl; 
  5. [/e:loop] 

下一篇鏈接:(把小于號改成大于號) 

  1. [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}] 
  2. <?php 
  3. $titleurl=sys_ReturnBqTitleLink($bqr); 
  4. echo $titleurl; 
  5. [/e:loop] 

3)運用靈動標簽調(diào)用,比較簡潔的方式

  1. <!--上一篇--> 
  2. [e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}] 
  3. <a href="<?php 
  4. echo $bqsr[titleurl]; 
  5. $pre='true'; 
  6. ?>">上一篇:<?=$bqr[title]?> 
  7. </a> 
  8. [/e:loop] 
  9. <?php 
  10. if(empty($pre)){ 
  11. echo "上一篇:很抱歉沒有了"; 
  12. ?> 
  13. <!--下一篇--> 
  14. [e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}] 
  15. <a href="<?php 
  16. echo $bqsr[titleurl]; 
  17. $next='true'; 
  18. ?>">下一篇:<?=$bqr[title]?> 
  19. </a> 
  20. [/e:loop] 
  21. <?php 
  22. if(empty($next)){ 
  23. echo "下一篇:很抱歉沒有了"; 
  24. ?> 

4)控制上一篇下一篇標題字數(shù)截取30個字符為例 

運用:<?=esub($bqr[title],30)?> 

  1. <!--上一篇--> 
  2. [e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}] 
  3. <a href="<?php 
  4. echo $bqsr[titleurl]; 
  5. $pre='true'; 
  6. ?>">上一篇: <?=esub($bqr[title],30)?></a> 
  7. [/e:loop] 
  8. <?php 
  9. if(empty($pre)){ 
  10. echo "上一篇:很抱歉沒有了"; 
  11. ?> 
  12. <!--下一篇--> 
  13. [e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}] 
  14. <a href="<?php 
  15. echo $bqsr[titleurl]; 
  16. $next='true'; 
  17. ?>">下一篇:<?=esub($bqr[title],30)?> 
  18. </a> 
  19. [/e:loop] 
  20. <?php 
  21. if(empty($next)){ 
  22. echo "下一篇:很抱歉沒有了"; 
  23. ?> 
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 涞水县| 商河县| 霍州市| 雷波县| 来宾市| 汝阳县| 博爱县| 齐齐哈尔市| 杂多县| 大邑县| 高密市| 临湘市| 恩平市| 新龙县| 安丘市| 隆子县| 株洲县| 奉贤区| 宜丰县| 阳曲县| 海口市| 布尔津县| 葵青区| 宿州市| 阳信县| 万山特区| 嘉义市| 莆田市| 衡东县| 治多县| 梅河口市| 通渭县| 巴楚县| 嘉峪关市| 固镇县| 伊春市| 滁州市| 卢龙县| 龙游县| 象山县| 海阳市|