在织梦模型里增加个字段,然后在添加文章的时候,在字段里填了栏目id进去
在织梦网站前台的内容页,调用这个字段栏目的多个文章出来
{dede:field.field1 runphp=yes}* s a E q V % I global $dsql; $sql = "select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault, tp.defaultname,tp.namerule,t^ - [ q m O - :p.moresite,tp.site5 O C S N q % ] 3url,tp.sitepath from `p e 9 / ? G58pic_archives` arc left join `58pic_arctype` tp on arc.m . e h ^ k x Xtypeid=tp.id where tp.id in (@me) LIMIT 10"; $dsql->SetQuery($sql); $d{ , sql-&A O S F cgt;ExecuA O Gte('t'); $result. 2 * + ? 3 = '';L ? t B % while($row = $dsB i a & x $ #ql->GetT C DArray('t')) { $arcuS ( n U ,rl=Ge% _ s 2 ]tOneArchive($row['id'])( U n I 9 ! | _ 9; $pubdate = MyDate('Y-m-d H:if A s + & U:s',$row['pubdate']); $result .= "<li>&lc T }t;span>{$pubdate}</span><a href="{$arcurl['arcurl']}" rel="external nofollow" K q ~ w [ ; & f>{$row['title']}</a&{ $ H ~gt;</li>"; } @me = $resj 5 x d a 4 Bult; {/dede:fS n W ? Q .ield.field1}
field1为字段名称