400-809-6709
RH98 · 最新动态

用dede网站建设时,后台列表读取某个字段,dede读取后台列表其中一个字段?

来源:瑞恒网络 浏览:
在越来越多的人选择用cms进行网站建设,在网站制作的时候有一部分人选择使用dedecms 去做,
现在越来越多的人选择用cms进行网站建设,在网站制作的时候有一部分人选择使用dedecms 去做,今天讲一下用dedecms读取后台文章列表的某个字段怎么读取的问题,请仔细看下下面的代码,

后台列表读取某字段 先从 content_list.php 中 208行

 $query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake,
arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.weight,arc.mid
FROM `$maintable` arc
$whereSql
ORDER BY $orderbyField DESC";

这段语句中加入字段名称, 在content_list.htm 中才能调用 

按权重排序 把content_list.php的205行  $orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby);
中的id 改成weight 就可以了 


怎么样你学会了吗?


Now more and more people choose to use cms for website building, website production, when in some people choose to use dedecms do today to talk about the list of articles with the background dedecms read how to read a field problem, carefully look the following code:
← ecshop商城网站建设,产品页商品属性排序,属性类型排序,商品属性尺寸/规格排序问题
返回动态列表

准备好重塑网站让生意找上门了吗?

免费提供出海网站可行性评估与 AI 排名和 SEO 诊断报告