我创建了 Joomla!以前的模板,但依赖插件和模块来制作下拉式、吸盘式菜单。如何在不依赖插件和扩展的情况下创建一个作为模板的一部分?
1 回答
First step. Go into Joomla's module manager, make sure that the menu module is set to display all the levels that you want it to (eg, if you want just two levels down then it's set to "2", if you want it five levels down set it to "5".
Look at the output, copy that source code. If you want to skip a few steps that's your markup.
Style your menu as you would with with a text editor, using jQuery or whatever for animation if you want. Your markup will be pretty important, keep it clean. If you want to change the markup (say, swap out <h3>
for <li>
as one jQuery plugin does) then you'll need an override for your menu.
Your styling should all be in your css file. Just upload that to your server, make sure that it's linked in the head of your template, and it should work.