易优:指定栏目的封面页内容,比如栏目ID是1,在易优这边只有单页模型的栏目才有封面页内容
{eyou:sql sql='select content from `__PREFIX__single_content` where typeid = 1' id='field'}
{$field.content|html_msubstr=###,0,300,true}
{/eyou:sql}
或者
{eyou:type typeid='1' addfields='content' id='field'}
{$field.content|html_msubstr=###,0,300,true}
{/eyou:type}
易优:调用指定栏目的数据,比如栏目ID是1
{eyou:sql sql='select * from `__PREFIX__arctype` where id = 1' id='field'}
栏目ID:{$field.id}
栏目名称:{field:typename}
栏目链接:{field:typeurl}
{/eyou:sql}
或者
{eyou:type typeid='1' id='field'}
栏目ID:{$field.id}
栏目名称:{field:typename}
栏目链接:{field:typeurl}
{/eyou:type}
易优:调用指定栏目的数据,比如栏目ID是1
{eyou:php}
$sql = 'select * from ey_arctype';
$tmp_list = db()->query($sql);
foreach ($tmp_list as $_k => $_v) {
echo "栏目ID:".$_v['id'];
echo " -- ";
echo "栏目名称:".$_v['typename'];
echo " -- ";
echo "栏目链接:".typeurl('home/Lists/index', $_v);
echo "<br/>";
}
{/eyou:php}
