在织梦cms会员中心的收藏里面,每条收藏的信息把他对应的描述内容也显示出来。
那么怎么做呢?
1、打开/member/mystow.php
差不多19行到25行,把这段代码 替换为:
if($rank == 'top'){ $sql = "SELECT s.*,COUNT(s.aid) AS num,t.* from dede_member_stow AS s LEFT JOIN `dede_member_stowtype` AS t on t.stowname=s.type left join `dede_archives` AS ar on ar.id=s.aid group by s.aid order by num desc"; $tpl = 'stowtop'; }else{ $sql = "SELECT s.*,t.*,ar.* FROM `dede_member_stow` AS s left join `dede_member_stowtype` AS t on t.stowname=s.type left join `dede_archives` AS ar on ar.id=s.aid where s.mid='".$cfg_ml->M_ID."' order by s.id desc"; $tpl = 'mystow'; }
2、打开/member/templets/mystow.htm 和 /member/templets/stowtop.htm
搜索收藏时间 在收藏时间上面加这句代码
<tr> <td colspan="6" class="tabTitle tbBtm">描述:<?php echo $fields['description']; ?></td> </tr>
完成
织梦二次开发QQ群
本站客服QQ号:862782808(点击左边QQ号交流),群号(383578617) 如果您有任何织梦问题,请把问题发到群里,阁主将为您写解决教程!
转载请注明: 织梦模板 » 织梦dedecms会员中心我的收藏新增一个自定义字段显示