mymps蚂蚁分类信息首页模板添加推荐信息代码
模板调用代码,复制放在想要调用的地方:
<!--{php $index_topinfo = mymps_get_infos($tpl_index['indextopinfo'],NULL,3);}-->
<!--{if $index_topinfo}-->
<!--首页头版新-->
<div class="newindexiwh_des"><ul><li>推荐信息</li></ul></div>
<div class="main_top newindexiwh_top">
<div class="newindexiwh">
<ul>
<!--{loop $index_topinfo $k}-->
<li><a style="{if $k[ifred]==1}color:#f00;{/if}{if $k[ifbold]==1}font-weight:bold;{/if}" href="{$k[uri]}" target="_blank" title="首页置顶信息 {$k[title]}">{$k[title]}</a></li>
<!--{/loop}-->
</ul>
</div>
</div>
<!--首页头版新-->
<div class="clear"></div>
<!--{/if}-->
CSS样式:
<style>
.newindexiwh_des{width:1200px;height:auto;overflow:hidden;margin:0 auto;}
.newindexiwh_des ul{margin:0;padding:0;}
.newindexiwh_des ul li{list-style-type:none;float:left;width:160px;font-size:14px;font-weight:bold;text-align:center;line-height:27px;height:27px;background:#EA5504;color:#fff;font-size:12px;}
.newindexiwh_top{width:1198px;height:auto;overflow:hidden;margin:0 auto;clear:both;border:1px solid #EA5504;}
.newindexiwh{width:1198px;height:auto;overflow:hidden;margin:5px auto;}
.newindexiwh ul{padding:0;margin:0;}
.newindexiwh ul li{width:399px;height:24px;list-style-type:none;overflow:hidden;margin:3px 0;float:left;text-align:left;text-indent:10px;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #999;}
.newindexiwh ul li .newindexiwh_left{width:27px;height:20px;overflow:hidden;background:url(../images/top_a_4.gif) left no-repeat;float:left;text-align:center;font-weight:bold;}
.newindexiwh ul li .newindexiwh_right{width:304px;height:20px;float:left;line-height:20px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #999;}
.newindexiwh ul li .newindexiwh_right span a{color:#666;}
.newindex_cate{width:980px;height:auto;overflow:hidden;margin:0 auto;clear:both;}
.newindex_cate table{background-color:#ccc;}
.newindex_cate table tr{background-color:#fff;}
.newindex_cate table tr td{padding:6px 0;}
.newindex_cate_second{width:98%;height:auto;overflow:hidden;margin:0 auto;}
.newindex_cate_second ul{margin:0;padding:0;}
.newindex_cate_second ul li{width:165px;height:auto;overflow:hidden;list-style-type:none;float:left;line-height:22px;text-align:left;font-size:14px;}
.newindex_cate_second ul li span{color:#777;font-size:12px;}
.f14b{font-size:14px;font-weight:bold;}
.f14b span{font-weight:normal;color:#999;}
.newbgcolor{background-color:#f7f7f7;}
</style>