<!--{foreach from=$hot_goods item=goods}-->
<div class="goodsItem">
<span class="hot"></span>
<a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" class="goodsimg" /></a><br />
<p><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
<font class="f1">
<!-- {if $goods.promote_price neq ""} -->
{$goods.promote_price}
<!-- {else}-->
{$goods.shop_price}
<!--{/if}-->
</font>
</div>
<!--{/foreach}-->
<div class="more"><a href="../search.php?intro=hot"><img src="images/more.gif" /></a></div>
<!-- {if $cat_rec_sign neq 1} -->
</div>
</div>
</div>
<div class="blank5"></div>
<!-- {/if} -->
<!-- {/if} -->我想先问一下ECSHOP是用smarty做的吗,有些语法我感觉好奇怪
<!-- {/if} --> 为什么这样写<!-- -->感觉好像是注释掉的。还有我学smarty的时候,只要有两个文件php代码文件和模板文件分离开来,怎么ecshop里面还有个库文件是怎么回事.lbi结尾的。
<!-- #BeginLibraryItem "/library/recommend_hot.lbi" --> <!-- #EndLibraryItem -->这是个包含语句么,这我也没见过,麻烦高手帮我一一解答一下,谢谢
<!-- #BeginLibraryItem "/library/recommend_hot.lbi" --><!-- {if $hot_goods} -->
<!-- {if $cat_rec_sign neq 1} -->
<div class="box">
<div class="box_2 centerPadd">
<div class="itemTit Hot" id="itemHot">
{if $cat_rec[3]}
<h2><a href="javascript:void(0)" onclick="change_tab_style('itemHot', 'h2', this);get_cat_recommend(3, 0);">{$lang.all_goods}</a></h2>
{foreach from=$cat_rec[3] item=rec_data}
<h2 class="h2bg"><a href="javascript:void(0)" onclick="change_tab_style('itemHot', 'h2', this);get_cat_recommend(3, {$rec_data.cat_id})">{$rec_data.cat_name}</a></h2>
{/foreach}
{/if}
</div>
<div id="show_hot_area" class="clearfix goodsBox">
<!-- {/if} -->
<!--{foreach from=$hot_goods item=goods}-->
<div class="goodsItem">
<span class="hot"></span>
<a href="{$goods.url}"><img src="{$goods.thumb}" alt="{$goods.name|escape:html}" class="goodsimg" /></a><br />
<p><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>
<font class="f1">
<!-- {if $goods.promote_price neq ""} -->
{$goods.promote_price}
<!-- {else}-->
{$goods.shop_price}
<!--{/if}-->
</font>
</div>
<!--{/foreach}-->
<div class="more"><a href="../search.php?intro=hot"><img src="images/more.gif" /></a></div>
<!-- {if $cat_rec_sign neq 1} -->
</div>
</div>
</div>
<div class="blank5"></div>
<!-- {/if} -->
<!-- {/if} --> <!-- #EndLibraryItem -->谢谢楼上大哥回答,再请教一个问题,
<!-- #BeginLibraryItem "/library/recommend_hot.lbi" --><!-- #EndLibraryItem -->这是包含语句么?这也看不大明白
都是这个处理的。