帝國默認的上一篇、下一篇鏈接比較單一,無法滿足個性化,如下:
下一篇鏈接:
1 | [!--info.next--] |
上一篇鏈接:
1 | [!--info.pre--] |
用靈動標簽調用上、下一篇鏈接,標題可截取字數,可自定義顯示文字,或用圖標代替:
=====靜態調用========
下一篇鏈接:
123456789101112 | [e:loop={ 'selfinfo' ,1,0,0, 'id>' . $navinfor [id]. '' , 'idasc' }] <ahref="<?php echo $bqsr [titleurl]; $pre = 'true' ; ?>"> <imgsrc= "[!--news.url--]skin/mm/pic/pic_after.gif" style= 'background:url(<?=$bqr[titlepic]?>)center50%' ><?=esub( $bqr [title],20)?></a> [/e:loop] <?php if ( empty ( $pre )){ echo "下一篇:很抱歉沒有了" ; } ?> |
上一篇:
123456789101112 | [e:loop={ 'selfinfo' ,1,0,0, 'id<' . $navinfor [id]. '' , 'iddesc' }] <ahref="<?php echo $bqsr [titleurl]; $pre = 'true' ; ?>"> <imgsrc= "[!--news.url--]skin/mm/pic/pic_before.gif" style= 'background:url(<?=$bqr[titlepic]?>)center50%' ><?=esub( $bqr [title],20)?></a> [/e:loop] <?php if ( empty ( $pre )){ echo "上一篇:很抱歉沒有了" ; } ?> |
如果需要截取標題字數,則將標題標簽替換即可:
不截取標題:
1 | <?= $bqr [title]?> |
截取標題字數:
1 | <?=esub( $bqr [title],30)?> |
標題圖片:
1 | <?= $bqr [titlepic]?> |
======動態調用=========
動態調用上一篇鏈接:
1 | <ahref= "[!----news.url--]e/public/GotoNext?classid=[!----classid--]&id=[!----id--]&enews=next" >下一篇</a> |
動態調用下一篇鏈接:
1 | <ahref= "[!-news.url--]e/public/GotoNext?classid=[!-classid--]&id=[!-id--]&enews=pre" >上一篇</a> |
新聞熱點
疑難解答