帝國(guó)CMS模板制作中,欄目列表內(nèi)容如何調(diào)用副表中的字段?答:把下面這個(gè)代碼要放在“列表內(nèi)容模板(list.var)”中,并在左上角勾選“使用程序代碼”。
代碼如下
$fr=$empire->fetch1("select writer,befrom,newstext from {$dbtbpre}ecms_news_data_{$r[stb]} where id='$r[id]'");
$listtemp='
標(biāo)題:<a href="[!--titleurl--]">[!--title--]</a> <br>
作者:'.$fr[writer].' 來(lái)源于:'.$fr[newstext].' <br>
簡(jiǎn)介(截取內(nèi)容頁(yè)部分內(nèi)容):
'.esub(htmlspecialchars(strip_tags(str_replace(' ','',str_replace('“','',str_replace('”','',$fr[newstext]))))),200).'......
<br>
';