Dream Dedecms V5.7 Add a navigation bar Drop-down submenu method

Source: Internet
Author: User

In the official template in dedecms5.5 set the Drop-down menu display, but after a few versions of the Drop-down menu is no longer used in the template, the earlier days, the tribe heard a few use weaving dream dedecms V5.7 template to ask this question, online look, there is a way to more reliable, We can refer to it.

First you need to put the DedeCMS5.6 program folder \dede\img mmenubg.gif (green background picture, apply to Green theme template) or DedeCMS5.5 program folder \templets\images mmenubg.gif ( Blue background picture, suitable for the blue theme template) copied to the DedeCMS5.7 program folder/templets/default/images below, now you look at the effect, oh, the navigation bar is not already appear familiar pull-down menu.

We copied the above picture on the line, download down to save.

Next, we will directly paste the following code into the Templets\default\footer.htm file, as long as this file in the line, the location does not matter.

The code is as follows Copy Code
<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/} ' class= ' Dropmenu ">
{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>

Refreshing the web discovery has magically appeared in the Drop-down menu, but it is transparent at this time because there is no picture of a drop-down menu because there is no background picture.

After downloading the picture, upload the picture to/templets/default/images/below. That's the top picture.

At this point, you want the effect is basically completed, if you want to do other settings, such as adjust the position, only need to find/templets/default/style/dedecms.css files, ctrl+f look for. Dropmenu

If you just adjust the width, use only the modification:

width:100px;/*------//Original parameter is 120-, if the two-level title less words, you can adjust the parameters to 80, or even a--------*

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.