说明一下:

以下 <?=$IndexClass[classname]?> 位置显示为父栏目名称,<?=$ClassLink?>为父栏目链接

想要显示当前信息所属的子栏目名称及链接,改成<?=$bqsr[classname]?><?=$bqsr[classurl]?>

<!-- 循环开始 --><?php$Result = sys_ReturnEcmsLoopBq("select classid,classname from {$dbtbpre}enewsclass where classid in($public_r[add_zhann_home_classid]) order by myorder,myorder desc",0,24,0);while($IndexClass=$empire->fetch($Result)){  $ClassLink = sys_ReturnBqClassname($IndexClass,9);?><div class="con_lm bj_mt30 louti"><div class="head_2 main"><!-- 栏目标题 --><div class="fl lm_head_l"><h3><em class="iconfont cb f24">&#xe6ec;</em><a href="<?=$ClassLink?>" target="_blank" title="<?=$IndexClass[classname]?>" class="f24 ca"><?=$IndexClass[classname]?></a></h3></div><!-- 栏目标题 --><div class="fr lm_head_r">[e:loop={"select * from phome_enewsclass where bclassid=$IndexClass[classid] order by classid asc limit 25",0,24,0}]<li><a href="<?=$bqsr[classurl]?>" target="_blank" class="head_ra chao fl"><?=$bqr[classname]?></a></li>[/e:loop]</div></div><div class="lm_nr main bj_mt20"><div class="lm_nr_nr"><div class="lm_nr_l fl bg2 yj_10 hidden"><div class="head_3"><h4 class="f18 nobold fl"><em class="iconfont cb f18">&#xe638;</em>热门图文</h4><a href="<?=$ClassLink?>" target="_blank" title="更多" class="more fr">更多</a></div><div class="hot_tw main bj_mt20"><div class="bd"><ul class="infoList"><?php$bqno=0;  $ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],2,0,1);  while($ClassGoods=$empire->fetch($ResultG)){$bqno++;?><li><a href="<?=$ClassGoods[titleurl]?>" title="<?=$ClassGoods[title]?>" target="_blank" class="a_img photo hidden yj_10 chao"><img src="<?=$ClassGoods[titlepic]?>" alt="<?=$ClassGoods[title]?>"></a><a href="<?=$ClassGoods[titleurl]?>" title="<?=$ClassGoods[title]?>" target="_blank" class="bt_a chao bj_mt20 f18"><?=$ClassGoods[title]?></a><p class="chao3 c9 f13 bj_mt10"><?=$ClassGoods[smalltext]?></p><div class="li_b bj_mt10"><time><?=date('m-d',$ClassGoods[newstime])?></time><a href="<?=$bqsr[classurl]?>" title="<?=$IndexClass[classname]?>" target="_blank" class="cb f13"><?=$bqsr[classname]?></a></div></li><?php     }     //显示2条?> </ul></div><div class="hd"><ul class="num"><li class="fl"><?=$bqno?></li></ul></div></div></div><div class="lm_nr_c fl"><div class="head_3"><h4 class="f18 nobold fl"><em class="iconfont ca f18">&#xe6eb;</em>最新文章</h4><a href="<?=$ClassLink?>" target="_blank" title="更多" class="more fr">更多</a></div><div class="lm_lb bj_mt20"><?php$bqno=0;  $ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],2,0,0,'','onclick DESC');  while($ClassGoods=$empire->fetch($ResultG)){$bqno++;?><div class="lb_2"><a href="<?=$ClassLink?>" title="<?=$IndexClass[classname]?>" target="_blank" class="lm2_a cb fl chao2"><?=$IndexClass[classname]?></a><div class="fl lb_l"><a href="<?=$ClassGoods[titleurl]?>" title="<?=$ClassGoods[title]?>" target="_blank" class="bt_a chao bold"><?=$ClassGoods[title]?><time><?=date('m-d',$ClassGoods[newstime])?></time></a><p class="chao c9 f13"><?=$ClassGoods[smalltext]?></p></div></div><?php     }     //显示2条    ?><?php$bqno=0;  $ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],6,0,0,'','newstime DESC');  while($ClassGoods=$empire->fetch($ResultG)){$bqno++;?><div class="lb_1"><a href="<?=$ClassLink?>" title="<?=$IndexClass[classname]?>" target="_blank" class="lm_a chao fl"><?=$IndexClass[classname]?></a><a href="<?=$ClassGoods[titleurl]?>" title="<?=$ClassGoods[title]?>" target="_blank" class="bt_a chao fl"><?=$ClassGoods[title]?></a><time class="fr"><?=date('m-d',$ClassGoods[newstime])?></time></div><?php     }     //显示6条    ?> </div></div><div class="lm_nr_r fr"><div class="head_3"><h4 class="f18 nobold fl"><em class="iconfont cb f18">&#xe67a;</em>热门排行</h4><a href="<?=$ClassLink?>" target="_blank" title="更多" class="more fr">更多</a></div><div class="lm_lb bj_mt20"><div class="lb_3"><?php$bqno=0;  $ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],'2,1',0,0,'','onclick DESC');  while($ClassGoods=$empire->fetch($ResultG)){$bqno++;?><div class="fl lb_on"><span class="cf f24">0<?=$bqno?></span><time class="cf"><?=date('m-d',$ClassGoods[newstime])?></time></div><div class="fl lb_l"><a href="<?=$ClassGoods[titleurl]?>" title="<?=$ClassGoods[title]?>" target="_blank" class="bt_a chao bold"><?=$ClassGoods[title]?></a><div class="lb_l_b"><a href="<?=$ClassLink?>" title="<?=$IndexClass[classname]?>" target="_blank" class="lm2_a cb fl chao2"><?=$IndexClass[classname]?></a><p class="chao c9 f13"><?=$ClassGoods[smalltext]?></p></div></div><?php     }     //显示1条    ?> </div><?php$bqno=0;  $ResultG = sys_ReturnEcmsLoopBq($IndexClass[classid],'3,8',0,0,'','onclick DESC');  while($ClassGoods=$empire->fetch($ResultG)){$bqno++;?><div class="lb_1"><span>0<?=$bqno+1?></span><a href="<?=$ClassLink?>" title="<?=$IndexClass[classname]?>" target="_blank" class="lm_a chao fl"><?=$IndexClass[classname]?></a><a href="<?=$ClassGoods[titleurl]?>" title="<?=$ClassGoods[title]?>" target="_blank" class="bt_a chao fl"><?=$ClassGoods[title]?></a><time class="fr"><?=date('m-d',$ClassGoods[newstime])?></time></div><?php     }     //显示8条    ?> </div></div><div class="clear"></div></div></div></div><?}?><!--栏目循环end-->