0

我的菜单栏使用了 mod_mainmenu。现在,当我将鼠标悬停在菜单项上时,我想要一个文本。任何机构都可以帮助我。

还请告诉文件以及我必须在哪里进行修改。

万分感谢。

4

2 回答 2

0

在 mod_mainmenu 中转到创建菜单的位置。为. title_anchor<a>

例如:

<a href="/index.php?title=Talk:Accessing_the_database_using_JDatabase/" title="Discussion about the content page">Discussion</a>
于 2013-01-03T06:20:49.123 回答
0

您可以在标签中添加标题属性以在鼠标悬停中显示它。为了在标签中添加标题,您必须修改 mod_mainmenu 的 helper.php。这是路径 -modules/mod_mainmenu/helper.php

在上面的文件中搜索此代码 -

switch ($tmp->browserNav)
{
    default:
    case 0:
        // _top
        $data = '<a title="'.$tmp->name.'" href="'.$tmp->url.'">'.$image.$tmp->name.'</a>';
        break;
    case 1:
        // _blank
        $data = '<a title="'.$tmp->name.'" href="'.$tmp->url.'" target="_blank">'.$image.$tmp->name.'</a>';
        break;
    case 2:
        // window.open
        $attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,'.$this->_params->get('window_open');

        // hrm...this is a bit dickey
        $link = str_replace('index.php', 'index2.php', $tmp->url);
        $data = '<a title="'.$tmp->name.'" href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');return false;">'.$image.$tmp->name.'</a>';
        break;
}

并添加 title 属性和它的值。

您也可以尝试模板覆盖

希望这会有所帮助。

于 2013-01-03T09:48:26.103 回答