Home  >  Article  >  CMS Tutorial  >  Summary of methods for calling the previous and next articles on the content page of Empire CMS

Summary of methods for calling the previous and next articles on the content page of Empire CMS

silencement
silencementforward
2019-11-27 11:56:432982browse

Summary of methods for calling the previous and next articles on the content page of Empire CMS

The example in this article summarizes the methods of calling the previous and next articles on the content page of Empire CMS. Share it with everyone for your reference. The specific method is as follows:

1. Dynamically call the previous article and next article link

The code is as follows:

3101fd0b00fb1118829da026f936c556Previous post5db79b134e9f6b82c0b36e0489ee08ed

Dynamically call the previous link

The code is as follows:

3349544c9e73fa40d0000181443d587dNext article5db79b134e9f6b82c0b36e0489ee08ed

Dynamic call next article link
2. Smart tags And SQl statement call

Previous article link:

Recommended to study "Empire cms tutorial"

The code is as follows:

[ e:loop={"select id,classid,newspath,filename,groupid,titleurl from [!db.pre!]ecms_".$class_r[$navinfor[classid]]['tbname']." where idd4e5d73323a380e3fd5212a1f6b70cfd".$navinfor[id]." and classid=".$navinfor[classid]." and checked=1 order by id desc limit 1",1,24, 0}]
005bb46c2bee2a48978baa6f876b13c6
[e:loop={'selfinfo', 1,0,0,'iddbc0cf3b321f619d7a56b7861a8dcac7">Previous article:c27ad0191b432d1f6e8aa97915b5c9f0
5db79b134e9f6b82c0b36e0489ee08ed
[/e:loop ]
d0f814fe4ce5a6308e6f15e1a7ce26bd
968f0688588288dad33fcc01b9f063df
[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}]
56c092806909634592baf6601dd57d17">Next article:a465b4cd1cd98fbd418c542c5ee78f15
5db79b134e9f6b82c0b36e0489ee08ed
[/e:loop]
bbbf034161ffc5a718871d945850c343

4. Control the number of words in the title of the previous article and the next article (take 30 characters as an example)

Use :

The code is as follows:

b98bd4a2553f919df88ba9d5edb93a9f

The code is as follows:

<!--上一篇-->
[e:loop={&#39;selfinfo&#39;,1,0,0,&#39;id<&#39;.$navinfor[id].&#39;&#39;,&#39;id desc&#39;}]
<a href="<?php
echo $bqsr[titleurl];
$pre=&#39;true&#39;;
?>">上一篇: <?=esub($bqr[title],30)?></a>
[/e:loop]
<?php
if(emptyempty($pre)){
echo "上一篇:很抱歉没有了";
}
?>
<!--下一篇-->
[e:loop={&#39;selfinfo&#39;,1,0,0,&#39;id>&#39;.$navinfor[id].&#39;&#39;,&#39;id asc&#39;}]
<a href="<?php
echo $bqsr[titleurl];
$next=&#39;true&#39;;
?>">下一篇:<?=esub($bqr[title],30)?>
</a>
[/e:loop]
<?php
if(emptyempty($next)){
echo "下一篇:很抱歉没有了";
}
?>

Hope What is described in this article will be helpful to everyone’s Imperial CMS website building.

The above is the detailed content of Summary of methods for calling the previous and next articles on the content page of Empire CMS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:www.word666.com. If there is any infringement, please contact admin@php.cn delete