The article add field fills in the column id, and the content page calls the column article in the field

Add a field to the model, and then when adding an article, fill in the column in the field. On the content page in theid foreground, call multiple articles in this field column to come out

{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.sitepath
from `#@__archives` arc left join `#@__arctype` tp on arc.typeid=tp.id where tp.id in (@me) LIMIT 10";
$dsql->SetQuery($sql);
$dsql->Execute('t');
$result = '';
while($row = $dsql->GetArray('t'))
{

$arcurl=GetOneArchive($row['id']);

$pubdate = MyDate('Y-m-d H:i:s',$row['pubdate']);
$result .= <<< TPL
<ul class="d4">
<li><span>{$pubdate}</span><a href="{$arcurl['arcurl']}">{$row['title']}</a></li>
</ul>
TPL;
}
@me = $result;
{/dede:field.field1}

field1is the field name

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325596889&siteId=291194637