Joomla如何自定义主菜单 [英] Joomla How to customize main menu

查看:148
本文介绍了Joomla如何自定义主菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在学习joomla,面对下一个问题。

I am learning joomla and faced the next problem.

这是HTML中的主菜单

Here is the main menu in HTML

<ul>
    <li class="active"><a href="#">home</a></li>
    <li><a href="#">bio</a></li>
    <li><a href="#">news</a></li>
    <li><a href="#" class="first-lev">projects<span class="ico"></span></a>
        <div class="sub-nav">
            <ul>
                <li><a href="#">yegor<br/>zabelov<br/>trio</a></li>
                <li><a href="#">gurzuf</a></li>
                <li><a href="#">soundtracks</a></li>
            </ul>
        </div><!-- .sub-nav -->
    </li>
    ...
</ul>

如何自定义joomla中的主菜单:

1 。添加类.first-lev到某些链接

2.使用这个类添加项目内的span

3.为子导航添加wrapper div
<

How is it possible to customize the main menu in joomla to:

1. add the class .first-lev to some links

2. add the span inside the item with this class

3. add the wrapper div for sub navigation

Appreciate any help.

推荐答案


  1. 要将类添加到某些链接,只需转到管理面板,选择您的菜单项。

  1. To add the class to the some links, just go to the admin panel, select your menu item. Go to the link type options->link CSS style, and add class manually.

您需要编辑default_component.php或defaul_url.php

You need to edit default_component.php or defaul_url.php

您需要编辑default.php

You need to edit default.php



< href =http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core> http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

要自定义菜单布局,只需复制

http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
To customize menu layout, just copy

/modules/mod_menu/tmpl 

$ b b

到:

to:

/templates/your_template/html/mod_menu

然后自定义刚刚复制的文件。此文件覆盖系统mod_menu文件。

不要忘记添加:

And then customize the files you just copied. This files override system mod_menu files.
Don't forget to add:

<folder>html</folder> 

您在templateDetails.xml。

at you templateDetails.xml.

这篇关于Joomla如何自定义主菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆