Provide zblog template_zblog them_wordpress template download and customization

Dedecms V5.7 Method to Realize the Pull Down Menu of Secondary Columns (personal testing is not reprinted)

Tianxing Studio 2013-03-07 23:10 course fifteen thousand three hundred and ninety-six 3 Comments


The main station of Tianxing Communication uses dedecms There are many categories of columns and many secondary columns. Today, on a whim, we are going to make a pull-down menu for these secondary columns. The previous version of dedecms has its own function. Later, I don't know why the new version canceled this function, but the js file and css are still there, so Baidu.

When the search results come out, they all look exactly the same. It is obvious that they are all reproduced. (I have read at least 20 articles. They are exactly the same. I haven't changed a word. Sweat!)

My personal sorting methods and steps are as follows:

Step 1: In Template Find the "footer. html" file in the folder, and add these codes anywhere in the folder:

 <script type=’text/javascript’ src=’{dede:global.cfg_cmsurl/}/images/js/dropdown.js’></script> {dede:channelartlist typeid=’top’ cacheid=’channelsonlist’}<ul id=”dropmenu{dede:field.typeid/}”> {dede:channel type=’son’ noself=’yes’}  <li><a href=”[field:typelink/]“>[field:typename/]</a></li> {/dede:channel} </ul> {/dede:channelartlist} <script type=”text/javascript”>cssdropdown.startchrome(“navMenu”)</script>

Step 2: If you modify the default css file "dedecms. css" of dedecms, you must ensure that the following css codes are in the css:

 .dropMenu{position:absolute;top:0;z-index:100;width:80px;visibility:hidden;margin-top:-1px;border:1px solid #036;border-top:0 solid #3CA2DC;background-color:#FFF;padding-top:6px;padding-bottom:6px;}.dropMenu li{margin-top:2px;margin-bottom:4px;padding-left:0;}.dropMenu a{width:auto;display:block;color:#000;padding:2px 0 2px 1.2em;} * html .dropMenu a{width:100%;}.dropMenu a:hover{color:red;text-decoration:underline;}

Step 3: update the home page to see that the effect has come out, and then just modify the css according to your own page needs.

If you refresh it and it still doesn't work, you must have modified the navigation code as I did. After studying for a long time, I found that it is actually like this:

1. First, make sure your navigation code is like this

 {dede:channel type='top' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~><span>~typename~</span></a></li>"} <li><a href='[field:typeurl/]' [field:rel/]><span>[field:typename/]</span></a></li> {/dede:channel}

2. At the same time, make sure that your navigation must be placed in a div with the ID of "navMenu". The class can be defined by itself.

3. Make sure you website The js file "/images/js/dropdown. js" is available.

Ok, make sure that your pull-down menu comes out after the above three points, right? If it hasn't come out yet! Please study or test your personality.


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

yes three Comments from netizens:

  •  Ghostwriting

    Ghostwriting Six years ago (2018-05-21) reply

    If you want to survive with your favorite website or link, you can enjoy the service with QR code and get all possible directions from this perfect area. At With the help of, you can enjoy a better time here.

  •  post

    post Six years ago (2018-04-11) reply

    This is the ideal position for everyone

  •  Smart City Home

    Smart City Home 8 years ago (2016-11-24) reply

    This is more detailed than others; But the code navigation on my home page is not like this. If I modify it, I will make an error. What can I do about this

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login