织梦文章添加字段填栏目id,内容页调用字段里的栏目文章
在前台的内容页,调用这个字段栏目的多个文章出来
{dede:field.fieldI.runphp=yes}
global$dsql;
$sql="selectarc.*,tp
更多精彩就在: 51免费论文网|www.jxszl.com
.typedir,tp.typename,tp.corank,tp.isdefault,
tp.defaultname,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath
from`dede_archives`arcleftjoin`dede_arctype`tponarc.typeid=tp.idwheretp.idin(@me)LIMITI.0";
$dsql->SetQuery($sql);
$dsql->Execute(t);
$result=;
while($row=$dsql->GetArray(t))
{
$arcurl=GetOneArchive($row[id]);
$pubdate=MyDate(Y-m-dH:i:s,$row[pubdate]);
$result.="
}
@me=$result;
{/dede:field.fieldI.}
fieldI.为字段名称
原文链接:http://www.jxszl.com/biancheng/dedecms/76278.html