muban大师 发表于 2020-6-22 10:39:39

织梦channel 频道标签currentstyle当前栏目高亮,无法应用于type=sun或son子分类中

织梦的channel 频道标签currentstyle可用于type=top或self兄弟分类上,没法用于子分类.
       
        基本语法:
       
        {dede:channel type='top' row='8' currentstyle="[*, "}   
       [*,,   
        {/dede:channel}   
       
        想让子分类也实现当前栏目高亮显示,只能手工列出所有类目.然后根据field;ID来判断.举例.比如下实现下面的侧边导航,其中,2,3,15分类为父类目.其它为子分类.代码如下
       
        css如下:
       
        .submenu a{padding:10px 20px;text-decoration:none;}
        .submenu li ul {display:none;}
        .submenu >li>a {font-weight:bold!important;}
        .active2 a{color:#e33;text-decoration:none;}
        .active3 >a{color:#e33;text-decoration:none;}
       
        html代码如下:
       
       
       Product classification
        {dede:type typeid=2}{/dede:type}
                
       {dede:type typeid=8}
        ref="">       {/dede:type}
          
        {dede:type typeid=9}
        ref="">       {/dede:type}
          
       
                   
          
          
       {dede:type typeid=3}{/dede:type}
                
       {dede:type typeid=4}
        ref="">       {/dede:type}
          
        {dede:type typeid=5}
        ref="">       {/dede:type}
          
       
       
                   
          
       {dede:type typeid=15}{/dede:type}
                
       {dede:type typeid=16}
        ref="">       {/dede:type}
          
          
       
                   
          
       
页: [1]
查看完整版本: 织梦channel 频道标签currentstyle当前栏目高亮,无法应用于type=sun或son子分类中