現在越來(lái)越多的人選擇用cms進(jìn)行網(wǎng)站建設,在網(wǎng)站制作的時(shí)候有一部分人選擇使用dedecms 去做,今天講一下用dedecms讀取后臺文章列表的某個(gè)字段怎么讀取的問(wèn)題,請仔細看下下面的代碼,
后臺列表讀取某字段 先從 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";
這段語(yǔ)句中加入字段名稱(chēng), 在content_list.htm 中才能調用
按權重排序 把content_list.php的205行 $orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby);
中的id 改成weight 就可以了
怎么樣你學(xué)會(huì )了嗎?
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: