首页精品推荐新品上市热销商品,后台模板设置5个出现空白区域!

2016-07-07 14:55 来源:www.chinab4c.com 作者:ecshop专家

首页精品推荐 新品上市 热销商品 后台设置5个 老是显示3个
缓存清除又好了
之前的哥们说可能是占位问题, 我检查了下没发现的,大家帮忙看下!

回答:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
{if $description}<meta name="description" content="{$description}"/>{/if}
{if $keywords}<meta name="keywords" content="{$keywords}"/>{/if}
<title>{$page_title}</title>
{include file='library/html_header.lbi'}
</head>
<body id="page_{$pname}"{if $option.three_column} class="three_col"{/if}>
{include file='library/page_header.lbi'}
<div id="content"><div class="container">
<div class="col_main">
{$render.before_col_main}
{if $shop_notice}<div class="shop_notice notice_box">{$shop_notice}</div>{/if}
<!-- TemplateBeginEditable name="主栏上方" -->
<!-- TemplateEndEditable -->
{include file='library/index_ad.lbi'}
<!-- TemplateBeginEditable name="主栏" -->
<!-- #BeginLibraryItem "/library/recommend_best.lbi" -->
{if $best_goods}
{if $cat_rec_sign neq 1}
<div class="box{if $pname eq 'index'} extra_box{else} special_box{/if} best_goods">
<div class="hd">
<h3>{$lang.best_goods}</h3>
<div class="extra">
{if $cat_rec[1]}
<p class="selector" id="itemBest">
<a href="javascript:void(0)" onclick="getRecommend(1, 0);" class="current"><span>{$lang.all_goods}</span></a>
{foreach from=$cat_rec[1] item=rec_data}
<a href="javascript:void(0)" onclick="getRecommend(1, {$rec_data.cat_id})"><span>{$rec_data.cat_name}</span></a>
{/foreach}
</p>
{/if}
</div>
</div>
{/if}
<div class="bd goods_list">
<div id="show_best">

<ul>
{foreach from=$best_goods item=goods name=best_goods}
<li{if $smarty.foreach.best_goods.index %5==0} class="first_child"{/if} data="id:'{$goods.id}'">
<span class="photo">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="image"><img src="{$option.static_path}{$goods.thumb}" alt="{$goods.name|escape:html}"/></a>
</span>
<span class="info">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="name">{$goods.short_style_name|truncate:7:"...":true}</a>
<em class="price">{if $goods.promote_price}{$goods.promote_price}{else}{$goods.market_price}{/if}</em>{if $goods.promote_price}<span class="promo" title="{$goods.shop_price|escape:html} &gt; {$goods.promote_price|escape:html}">{$lang.sale}</span>{/if}
</span>
</li>
{/foreach}
</ul>
{if $cat_rec_sign neq 1}
</div>
<a href="search.php?intro=best" title="{$lang.more}{$lang.best_goods}" class="more button brighter_button"><span>{$lang.more}</span></a>
</div>
</div>
{/if}
{/if}
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/recommend_new.lbi" -->
{if $new_goods}
{if $cat_rec_sign neq 1}
<div class="box{if $pname eq 'index'} extra_box{else} special_box{/if} new_goods">
<div class="hd">
<h3>{$lang.new_goods}</h3>
<div class="extra">
{if $cat_rec[2]}
<p class="selector" id="itemNew">
<a href="javascript:void(0)" onclick="getRecommend(2, 0);" class="current"><span>{$lang.all_goods}</span></a>
{foreach from=$cat_rec[2] item=rec_data}
<a href="javascript:void(0)" onclick="getRecommend(2, {$rec_data.cat_id})"><span>{$rec_data.cat_name}</span></a>
{/foreach}
</p>
{/if}
</div>
</div>
{/if}
<div class="bd goods_list">
<div id="show_new">

<ul>
{foreach from=$new_goods item=goods name=new_goods}
<li{if $smarty.foreach.new_goods.index %5==0} class="first_child"{/if} data="id:'{$goods.id}'">
<span class="photo">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="image"><img src="{$option.static_path}{$goods.thumb}" alt="{$goods.name|escape:html}"/></a>
</span>
<span class="info">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="name">{$goods.short_style_name|truncate:7:"...":true}</a>
<em class="price">{if $goods.promote_price}{$goods.promote_price}{else}{$goods.market_price}{/if}</em>{if $goods.promote_price}<span class="promo" title="{$goods.shop_price|escape:html} &gt; {$goods.promote_price|escape:html}">{$lang.sale}</span>{/if}
</span>
</li>
{/foreach}
</ul>
{if $cat_rec_sign neq 1}
</div>
<a href="search.php?intro=new" title="{$lang.more}{$lang.new_goods}" class="more button brighter_button"><span>{$lang.more}</span></a>
</div>
</div>
{/if}
{/if}
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/recommend_hot.lbi" -->
{if $hot_goods}
{if $cat_rec_sign neq 1}
<div class="box{if $pname eq 'index'} extra_box{else} special_box{/if} hot_goods">
<div class="hd">
<h3>{$lang.hot_goods}</h3>
<div class="extra">
{if $cat_rec[3]}
<p class="selector" id="itemHot">
<a href="javascript:void(0)" onclick="getRecommend(3, 0);" class="current"><span>{$lang.all_goods}</span></a>
{foreach from=$cat_rec[3] item=rec_data}
<a href="javascript:void(0)" onclick="getRecommend(3, {$rec_data.cat_id})"><span>{$rec_data.cat_name}</span></a>
{/foreach}
</p>
{/if}
</div>
</div>
{/if}
<div class="bd goods_list">
<div id="show_hot">

<ul>
{foreach from=$hot_goods item=goods name=hot_goods}
<li{if $smarty.foreach.hot_goods.index %5==0} class="first_child"{/if} data="id:'{$goods.id}'">
<span class="photo">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="image"><img src="{$option.static_path}{$goods.thumb}" alt="{$goods.name|escape:html}"/></a>
</span>
<span class="info">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="name">{$goods.short_style_name|truncate:7:"...":true}</a>
<em class="price">{if $goods.promote_price}{$goods.promote_price}{else}{$goods.market_price}{/if}</em>{if $goods.promote_price}<span class="promo" title="{$goods.shop_price|escape:html} &gt; {$goods.promote_price|escape:html}">{$lang.sale}</span>{/if}
</span>
</li>
{/foreach}
</ul>
{if $cat_rec_sign neq 1}
</div>
<a href="search.php?intro=hot" title="{$lang.more}{$lang.hot_goods}" class="more button brighter_button"><span>{$lang.more}</span></a>
</div>
</div>
{/if}
{/if}
<!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="主栏下方" -->
<!-- TemplateEndEditable -->
{$render.after_col_main}
</div>
<div class="col_sub">
{$render.before_col_sub}
<!-- TemplateBeginEditable name="侧栏上方" -->
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="侧栏" -->
<!-- #BeginLibraryItem "/library/category_tree.lbi" -->
{if $pname neq 'index'}

{if $pname eq 'category'}
{siy:category_tree_3 id=$category}
{elseif $pname eq 'goods'}
{siy:category_tree_3 id=$goods.cat_id}
{else}
<div class="category box fancy_box">
<div class="hd"><h3>{$lang.goods_category}</h3><div class="extra"></div></div>
<div class="bd{if $option.hide_category_extra} hide_extra{/if}">
<ul class="level_1 clearfix">
{foreach from=$categories item=cat name=categories}
<li class="level_1{if $smarty.foreach.categories.first} first{/if}">
<p class="level_1"><a href="{$cat.url}" class="level_1"><span>{$cat.name}</span></a></p>
{if $cat.cat_id}
<div class="sub_cat_lv1">
<div class="inner_lv1">
<ul class="level_2 clearfix">
{foreach from=$cat.cat_id item=child name=child_cat}
<li class="level_2 clearfix{if $smarty.foreach.child_cat.first} level_2_first{/if}">
<a href="{$child.url}" class="level_2"><span>{$child.name}</span></a>
{if $child.cat_id}
<div class="sub_cat_lv2">
<div class="inner_lv2">
<div class="arrow"></div>
<ul class="level_3 clearfix">
{foreach from=$child.cat_id item=childer name=childer_cat}
<li class="level_3"><a href="{$childer.url}" class="level_3"><span>{$childer.name}</span></a></li>
{/foreach}
</ul>
</div>
</div>
{/if}
</li>
{/foreach}
</ul>
</div>
</div>
{/if}
</li>
{/foreach}
</ul>
</div>
</div>
{/if}
{else}
{include file='library/all_category.lbi'}
{/if}

<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/vote_list.lbi" -->
{insert name='vote'}
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/ad_position.lbi" -->
{insert name=ads id=$ads_id num=$ads_num}
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/cat_articles.lbi" -->
<div class="cat_articles box">
<div class="hd">
<h3><a href="{$articles_cat.url}">{$articles_cat.name|escape:html}</a></h3>
<div class="extra">
<a href="{$articles_cat.url}">{$lang.more}</a>
</div>
</div>
<div class="bd">
<ul class="text_list">
{foreach from=$articles item=article_item name=articles}
<li{if $smarty.foreach.articles.first} class="first"{/if}><a href="{$article_item.url}" title="{$article_item.title|escape:html}">{$article_item.short_title|escape:html}</a></li>
{/foreach}
</ul>
</div>
</div>

<!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="侧栏下方" -->
<!-- TemplateEndEditable -->
{$render.after_col_sub}
</div>
{if $option.three_column}
<div class="col_extra">
{$render.before_col_extra}
<!-- TemplateBeginEditable name="侧栏二上方" -->
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="侧栏二" -->
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="侧栏二下方" -->
<!-- TemplateEndEditable -->
{$render.after_col_extra}
</div>
{/if}
</div>
</div>
<!-- TemplateBeginEditable name="整栏" -->
<!-- #BeginLibraryItem "/library/ad_position.lbi" -->
{insert name=ads id=$ads_id num=$ads_num}
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/cat_goods.lbi" -->
<center>
<div class="col_maint">
<div class="cat_goods box">
<div class="hd"><h3><a href="{$goods_cat.url}">{$goods_cat.name|escape:html}</a></h3><div class="extra"></div></div>
<div class="bd goods_list">
<ul>
<center>
{foreach from=$cat_goods item=goods name=cat_goods}
<li{if $smarty.foreach.cat_goods.index %6==0} class="first_child"{/if} data="id:'{$goods.id}'">
<span class="photo">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="image"><img src="{$option.static_path}{$goods.thumb}" alt="{$goods.name|escape:html}"/></a>
</span>
<span class="info">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="name">{$goods.short_name|truncate:8:"...":true}</a>
<em class="price{if $goods.promote_price} promote{/if}">{if $goods.promote_price}{$goods.promote_price}{else}{$goods.market_price}{/if}</em>
</span>
</li>
{/foreach}
</center>
</ul>
</div>
</div>
</div>
</center>
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/cat_goods.lbi" -->
<center>
<div class="col_maint">
<div class="cat_goods box">
<div class="hd"><h3><a href="{$goods_cat.url}">{$goods_cat.name|escape:html}</a></h3><div class="extra"></div></div>
<div class="bd goods_list">
<ul>
<center>
{foreach from=$cat_goods item=goods name=cat_goods}
<li{if $smarty.foreach.cat_goods.index %6==0} class="first_child"{/if} data="id:'{$goods.id}'">
<span class="photo">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="image"><img src="{$option.static_path}{$goods.thumb}" alt="{$goods.name|escape:html}"/></a>
</span>
<span class="info">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="name">{$goods.short_name|truncate:8:"...":true}</a>
<em class="price{if $goods.promote_price} promote{/if}">{if $goods.promote_price}{$goods.promote_price}{else}{$goods.market_price}{/if}</em>
</span>
</li>
{/foreach}
</center>
</ul>
</div>
</div>
</div>
</center>
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/cat_goods.lbi" -->
<center>
<div class="col_maint">
<div class="cat_goods box">
<div class="hd"><h3><a href="{$goods_cat.url}">{$goods_cat.name|escape:html}</a></h3><div class="extra"></div></div>
<div class="bd goods_list">
<ul>
<center>
{foreach from=$cat_goods item=goods name=cat_goods}
<li{if $smarty.foreach.cat_goods.index %6==0} class="first_child"{/if} data="id:'{$goods.id}'">
<span class="photo">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="image"><img src="{$option.static_path}{$goods.thumb}" alt="{$goods.name|escape:html}"/></a>
</span>
<span class="info">
<a href="{$goods.url}" title="{$goods.name|escape:html}" class="name">{$goods.short_name|truncate:8:"...":true}</a>
<em class="price{if $goods.promote_price} promote{/if}">{if $goods.promote_price}{$goods.promote_price}{else}{$goods.market_price}{/if}</em>
</span>
</li>
{/foreach}
</center>
</ul>
</div>
</div>
</div>
</center>
<!-- #EndLibraryItem -->
<!-- TemplateEndEditable -->
{include file='library/page_footer.lbi'}
{include file='library/html_footer.lbi'}
</body>
</html>

css有问题吧 百宝力网球拍




CSS有问题的话 也不应该在每个浏览器在清除缓存后就正常啊?

先清缓存,再看看.应该是CSS问题的.