POST TIME:2021-05-23 02:12
$rs['title'] = cn_substr($rs['title'], $titlelen);
//获取底层模板
$ctp->LoadSource($innertext);
foreach($ctp->CTags as $tagid=>$ctag) {
if(!empty($rs[strtolower($ctag->GetName())])) {
$ctp->Assign($tagid,$rs[$ctag->GetName()]);
}
}
|
$rs['title'] = cn_substr($rs['title'], $titlelen);
//获取底层模板
$ctp->LoadSource($innertext);
foreach($ctp->CTags as $tagid=>$ctag) {
if(!empty($rs[strtolower($ctag->GetName())])) {
$ctp->Assign($tagid,$rs[$ctag->GetName()]);
}
}
|
$revalue .= $ctp->GetResult();
}
return $revalue;
}
?>
接下来我们来测试我们这个标签,我们修改article_article.htm模板,在里面加入以下的标签代码:
{dede:writerarc row='10' titlelen='6'}
[field:title/]
{/dede:writerarc}
|
