有很多群友经常问行业信息版首页的信息为什么会错位(如下图:
出现这种情况有二个原因:
1、首页推荐栏目没有发布信息
2、首页栏目间广告全部取消了
如果这两个都不想改,那就只能改代码了
打开/template/default/index_classic.html
1、查找“{if $i%2 != 0}” 添加 {if $i%2 != 0}<div class="showbox ">{/if}
2、查找“{if $i%2 == 0}”添加 {if $i%2 == 0}</div>{/if}
保存更新页面缓存就可以了
也可以复制下面代码直接替换
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | { if $i %2 != 0}<div id= "ad_indexcatad_{$fcat[catid]}" ></div>{/ if } { if $i %2 != 0}<div class = "showbox " >{/ if } <div class = "showbox {if $i%2 != 0}sleft{else}sright{/if}" > <div class = "hd" > <div class = "cattitle" >{ if $fcat [icon]}<img alt= "{$fcat[catname]}" src= "{$mymps_global[SiteUrl]}{$fcat[icon]}" align= "absmiddle" /> {/ if }{ $fcat [catname]}信息</div> <div class = "postinfo" ></div> <div class = "moreinfo" ><a href= "{$mymps_global[SiteUrl]}/{$mymps_global[cfg_postfile]}?catid={$fcat[catid]}" target= "_blank" >发信息</a> | <a href= "{$fcat[uri]}" target= "_blank" >更多</a></div> </div> <div class = "bd" > <ul> <!--{loop $fcat [information] $info }--> <li> <span class = "time" >[{ echo GetTime( $info [begintime], 'm-d' )}]</span> <span class = "info" ><a href= "{$info[uri]}" target= "_blank" title= "{$info[title]}" style= "{if $info[ifred]==1}color:red;{/if} {if $info[ifbold] == 1}font-weight:bold;{/if}" >{ $info [title]}</a></span> <span class = "catname" ><a href= "{$info[caturi]}" target= "_blank" >{ $info [catname]}</a></span> </li> <!--{/loop}--> </ul> </div> </div> { if $i %2 == 0}</div>{/ if } { if $i %2 == 0}<div id= "ad_indexcatad_{$fcat[catid]}" ></div>{/ if } |
下图是修复后的效果
|
相关文章 |
华翔网络微信公众号
扫一扫加我为好友
扫一扫用手机访问
华翔网络科技服务中心 版权所有 承接网站设计制作,广告设计,安防监控等业务.电话微信:18023690303 QQ:68499514 地址:广东省南雄市黄坑镇文明西路88号二楼 粤ICP备19147431号