网站模板中心

您现在的位置:首页>>织梦大学>>织梦技巧

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

来源: 编辑:admin 发布时间:2020-07-02热度:92 ℃
织梦的channel 频道标签currentstyle可用于type=top或self兄弟分类上,没法用于子分类. 基本语法: {dede:channel type=top row=8 currentstyle=lia href=~typelink~ class=thisclass~typename~/a /li} lia href=[field:typelink/...
织梦的channel 频道标签currentstyle可用于type=top或self兄弟分类上,没法用于子分类.
 
基本语法:  
 
{dede:channel type='top' row='8' currentstyle="
  • ~typename~
  • "}   
    {/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代码如下:
     
       
     
  • {dede:type typeid=2} [field:typename /]{/dede:type}  
  •          
       
     
  • {dede:type typeid=8}
  •  
      
      
      
      
     
               
      
      
     
  • {dede:type typeid=3} [field:typename /]{/dede:type}  
  •          
       
     
  • {dede:type typeid=4}
  •  
      
      
      
      
     
               
      
     
  • {dede:type typeid=15} [field:typename /]{/dede:type}  
  •          
       
     
  • {dede:type typeid=16}
  •  
       
      
     
               
      
    Pbootcms问题解决

    请点击在线联系我们【点击咨询解决问题】   如果您有任何Pbootcms问题,我们将免费为您写解决教程!

      PB模板网:承接仿站业务,价格200元起!