$children1 = get_children(1);
$GLOBALS['smarty']->assign('hotGoods1', get_category_recommend_goods('hot', $children1));
2.index.dwt 模板中调用
<div class="goods-title">1F 家居</div>
<div class="clearfix goods-wrap">
<div class="goods-leftad">
<!-- #BeginLibraryItem "/library/index_ad1.lbi" --><!-- #EndLibraryItem -->
</div>
<div class="goods-right">
<!-- TemplateBeginEditable name="1层产品" -->
<!-- #BeginLibraryItem "/library/cat_goods1.lbi" -->
<!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
</div>
</div>index_ad1.lbi 代码为:<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
{insert name='ads' id=1 num=1}cat_goods1.lbi代码为:<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="all_ms">
<!--{foreach from=$hotGoods2 item=goods}-->
<a class="goodsItem" href="{$goods.url}"> <div class="img-box"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" class="goodsimg" /></div>
<div class="goods-brief">{$goods.brief|truncate:20}</div>
<div class="gos-title">{$goods.short_name|escape:html}</div>
<div class="prices">
<!-- {if $goods.promote_price neq ""} -->
<font class="shop_s">{$lang.promote_price}<b>{$goods.promote_price}</b></font>
<!-- {else}-->
<font class="shop_s"><b>{$goods.shop_price}</b></font>
<!--{/if}-->
</div>
</a>
<!--{/foreach}-->
<div class="clear0"></div>
</div>热门商品推荐 $smarty->assign('hot_goods', get_recommend_goods('hot')); // 热门商品最佳答案