dede频道页实现三级栏目嵌套调用文章

 

dede频道页实现三级栏目嵌套调用文章:

//支持arclist标签开始-->

$typeid = $row['id'];

if((class_exists('PartView')))

{

$pv = new PartView($typeid);

$text = $likeType;

$text= str_replace(array('{field', '/}'), array('[field', '/]'), $text);

$pv->SetTemplet($text,'string');

$artlist = $pv->GetResult();

$likeType = $artlist;

}

//支持arclist标签开始<--

在/include/taglib/channel.lib.php 125行加上 以上代码~


前台模板中使用

{dede:channelartlist}

{dede:field name='typeurl'/} {dede:field name='typename'/} //外框架

{dede:channel type='sun'}//子框架

<h3><a href="[field:typelink/]" target="_blank">[field:typename/]</a></h3>

{dede:arclist row='5' titlelen='39'} //调用文章

{field:arcurl/} {field:title/}

{/dede:arclist}

{/dede:channel}

{/dede:channelartlist}

原文地址:https://www.cnblogs.com/subtract/p/3226839.html