<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦dedecms文章页面显示同分类栏目下的其它文章

时间:2020-12-21

在文章页面通过{dede:field.aid runphp=’yes’}{/dede:field.aid}调用该文章id找出文章所属栏目,然后根据织梦CMS的一个方法找到文章页的url、标题等其它信息,实现在文章页面调用与该文章同一分类栏目的其它文章列表,以下代码调用当前文章栏目中不包括当前文章的其它15篇文章:
 

01 {dede:FIELD.aid runphp='yes'}
02 $aid = @me;
03 $sql = "select * from dede_archives where id =".$aid." limit 1";
04 $query = mysql_query($sql);
05 $row = mysql_fetch_array($query);
06 $typeid = $row["typeid"];
07 $sql = "SELECT * FROM dede_archives where id<>".$aid." and typeid =".$typeid." order by id desc limit 15";
08 $query = mysql_query($sql);
09 @me = "";
10 while($row = mysql_fetch_array($query)){
11     $id = $row["id"];
0