帝國CMS靈動標簽調用上一篇,下一篇標題鏈接字數
導讀:1建站知識帝國CMS模板網下面的帝國CMS教程欄目為您提供了帝國CMS靈動標簽調用上一篇,下一篇標題鏈接字數截取網站建設多少錢seo網站排名優化軟件。
一: 動態調用上一篇下一篇鏈接
<a href="[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=pre">上一篇</a> 動態調用上一篇鏈接 <a href="[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=next">下一篇</a> 動態調用下一篇鏈接
二: 運用靈動標簽和SQl語句調用
上一篇鏈接: [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}] <?php $titleurl=sys_ReturnBqTitleLink($bqr); echo $titleurl; [/e:loop]
下一篇鏈接:(把小于號改成大于號) [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}] <?php $titleurl=sys_ReturnBqTitleLink($bqr); echo $titleurl; [/e:loop]
三: 運用靈動標簽調用,比較簡潔的方式
<!--上一篇--> [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(empty($pre)){ echo "上一篇:很抱歉沒有了"; } ?>
<!--下一篇--> [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(empty($next)){ echo "下一篇:很抱歉沒有了"; }百度seo網站優化 ?>
四: 控制上一篇下一篇標題字數截取30個字符為例
運用:<?=esub($bqr[title],30)?>
<!--上一篇--> [e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}] <a href="<?php echo $bqsr[titleurl]; $pre='true'; ?>">上一篇: <?=esub($bqr[title],30)?></a> [/e:loop] <?php if(empty($pre)){ echo "上一篇:很抱歉沒有了"; } ?>
<!--下一篇--> [e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}] <a href="<?php echo $bqsr[titleurl]; $next='true'; ?>">下一篇:<?=esub($bqr[title],30)?> </a> [/e:loop] <?php if(em網站seo優化培訓pty($next)){ echo "下一篇:很抱歉沒有了"; } ?>
相關網站建設多少錢seo網站排名優化軟件。聲明: 本文由我的SEOUC技術文章主頁發布于:2023-05-22 ,文章帝國CMS靈動標簽調用上一篇,下一篇標題鏈接字數主要講述標簽,標題,CMS網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_4634.html