织梦【dedecms调用三级产品分类】代码

2017-03-27 20:02:39 dedecms

dedecms 调用二级比较方便。三级就有点麻烦。下面是代码。

这个是标签{dede:channelartlist typeid=3 } 这里的typeid 是我们的顶级栏目 比如产品中心。

{dede:channelartlist typeid=3 }


{dede:field name='typename'/}

{dede:sql sql='Select * from dede_arctype where reid=~id~ ORDER BY id limit 0,17'}

[field:typename/]

{/dede:sql}

{/dede:channelartlist}

css 代码:

大家看自己优化CSS

/*二级菜单*/

.my_left_category{

width:180px;

font-size:12px;

font-family:arial,sans-serif;

}

.my_left_category h1{

height:20px;

background-repeat:no-repeat;

font-size:14px;

font-weight:bold;

padding-left:15px;

padding-top:8px;

margin:0px;

color:#FFF;

}

.my_left_category .my_left_cat_list{

width:178px;

border-color:#b60134;

border-style:solid;

border-width:0px 1px 1px 1px;

line-height:13.5pt;

}

.my_left_category .my_left_cat_list h2{

margin:0px;

padding:3px 5px 0px 9px;

}

.my_left_category .my_left_cat_list h2 a{

color:#d6290b;

font-weight:bold;

font-size:14px;

line-height:22px;

}

.my_left_category .my_left_cat_list h2 a:hover{

color:#d6290b;

font-weight:bold;

font-size:14px;

line-height:22px;

}

.my_left_category .h2_cat{

width:178px;

height:26px;

background-repeat:no-repeat;

font-weight:normal;

color:#333333;

position:relative;

}

.my_left_category .h2_cat_1{

width:178px;

height:26px;

background-repeat:no-repeat;

line-height:26px;

font-weight:normal;

color:#333333;

position:relative;

}

.my_left_category a{

font:12px;

text-decoration:none;

color:#333333;

}

.my_left_category a:hover{

text-decoration:underline;

color:#ff3333;

}

.my_left_category h3{

margin:0px;

padding:0px;

height:26px;

font-size:12px;

font-weight:normal;

display:block;

padding-left:8px;

}

.my_left_category h3 span{

color:#999999;

width:175px;

float:right;

}

.my_left_category h3 a{

line-height:26px;

}

.my_left_category .h3_cat{

display:none;

width:204px;

position:absolute;

left:173px;

margin-top:0px;

cursor:auto;

}

.my_left_category .shadow{

position:inherit;

width:204px;

}

.my_left_category .shadow_border{

position:inherit;

width:200px;

border:1px solid #959595;margin-top:1px;

border-left-width:0px;

background-color:#ffffff;

margin-bottom:3px;

}

.my_left_category .shadow_border ul{

margin-top:0px;

padding-bottom:0px;

}

/*

.my_left_category .shadow_border ul li{

list-style:none;

padding-left:10px;

background-repeat:no-repeat;

background-position:0px 8px;

float:left;

width:75px;

height:26px;

overflow:hidden;

letter-spacing:0px;

}

*/

.my_left_category .active_cat{

z-index:99;

background-position:0 -25px;

cursor:pointer;

}

.my_left_category .active_cat h3{

font-weight:bold;

}

.my_left_category .active_cat h3 span{

display:none;

}

.my_left_category .active_cat div{