DEDECMS development skills
1. Call the drop-down list menu provided by dedecms
Dedecms has the drop-down menu function and is very simple to call. You do not need to find another tag by yourself when using the drop-down menu that comes with dedecms, you just need to modify the corresponding/templets/style/dedecms.css and the following lines of CSS code.
Open/templets/default/head.htm and find the section called by the dedecms navigation menu.
CCS won't be pasted here
<Div id = "navMenu">
<Ul>
<Li> <a href = '{dede: global. pai_cmsurl/}/'> <span> Home page </a> </li>
{Dede: channel type = 'top' row = '10' currentstyle = "<li class = 'hover '> <a href = '~ Typelink ~ '~ Rel ~> <Span> ~ Typename ~ </A> </li> "}
<Li> <a href = '[field: typeurl/]' [field: rel> <span> [field: typename/] </a> </li>
{/Dede: channel}
</Ul>
</Div>
Specifically, type = 'top' indicates that the top-level column row = '10' indicates that the number of 10 columns to be called [field: rel/] is equivalent to the column id added to dropmenu. This label is added to dedecms5.5 and is mainly used to display lower-level columns in the navigation bar. Do not remove this label when using the drop-down menu.
{Dede: channel type = 'top' row = '10' currentstyle = "<li class = 'hover '> <a href = '~ Typelink ~ '~ Rel ~> <Span> ~ Typename ~ </A> </li> "} You can remove currentstyle =" <li class = 'hover '> <a href = '~ Typelink ~ '~ Rel ~> <Span> ~ Typename ~ </A> </li> "we should style this part and then open/templets/default/footer.htm to find the code for calling the dedecms call Level 2 drop-down menu <! -- // The secondary subclass drop-down menu, which is placed at the bottom for SEO reasons -->
<Script type = 'text/javascript 'src = '{dede: global. pai_cmsurl/}/images/js/dropdown. js'> </script>
{Dede: channelartlist typeid = 'top' cacheid = 'channellist'} <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 & gt; do not modify it any more, to change the level-2 menu style, you only need to modify the corresponding/templets/style/dedecms.css lines of CSS code.