国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 称多县| 尉犁县| 金川县| 区。| 礼泉县| 石渠县| 文昌市| 于都县| 广德县| 河北区| 全州县| 出国| 连江县| 景宁| 尼勒克县| 安多县| 呼伦贝尔市| 唐海县| 洪泽县| 金坛市| 明光市| 花莲市| 吉木萨尔县| 阿合奇县| 陵水| 邹平县| 新巴尔虎左旗| 固安县| 保山市| 沂源县| 台北县| 西平县| 云林县| 镶黄旗| 汉中市| 鹿泉市| 香港 | 无为县| 嘉黎县| 水富县| 许昌县|