1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 织梦DedeCMS文章添加字段填栏目id 内容页调用字段里的栏目文章

织梦DedeCMS文章添加字段填栏目id 内容页调用字段里的栏目文章

时间:2019-12-02 03:39:32

相关推荐

织梦DedeCMS文章添加字段填栏目id 内容页调用字段里的栏目文章

在织梦模型里增加个字段,然后在添加文章的时候,在字段里填了栏目id进去

在织梦网站前台的内容页,调用这个字段栏目的多个文章出来

{dede:field.field1 runphp=yes}global $dsql;$sql = "select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.moresite,tp.siteurl,tp.sitepathfrom `58pic_archives` arc left join `58pic_arctype` tp on arc.typeid=tp.id where tp.id in (@me) LIMIT 10";$dsql->SetQuery($sql);$dsql->Execute( );$result = \;while($row = $dsql->GetArray( )){$arcurl=GetOneArchive($row[id]);$pubdate = MyDate(Y-m-d H:i:s,$row[pubdate]);$result .= "

{$pubdate}{$row[ itle]}";}@me = $result;{/dede:field.field1}

field1为字段名称

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。