0

我有这个仍在开发中的Joomla 3.2站点。出于某种原因,鼠标悬停的下拉效果似乎不起作用,除非它在活动页面上。

顺便说一句,我正在使用免费模板。关于解决此问题的任何想法?没有使用添加的菜单扩展。全部开箱即用。认为这可能是一个 js 调整,但一直在环顾四周,无法确定什么和在哪里......

当您在项目站点和联系我们部分时,会出现下拉列表的一个示例。

index.php 的示例代码可能会有所帮助。非常感谢!

    <?php
defined( '_JEXEC' ) or die( 'Restricted access' );
$LeftMenuOn = ($this->countModules('position-4') or $this->countModules('position-5') or $this->countModules('position-7'));
$RightMenuOn = ($this->countModules('position-6') or $this->countModules('position-8'));
$TopNavOn = ($this->countModules('position-13'));

$app = JFactory::getApplication();
$sitename = $app->getCfg('sitename');
$sitetitle = $this->params->get('sitetitle');
$sitedescription = $this->params->get('sitedescription');

$logopath = $this->baseurl . '/templates/' . $this->template . '/images/logo.gif';
$logo = $this->params->get('logo', $logopath);
$logoimage = $this->params->get('logoimage');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
    <jdoc:include type="head" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />
    <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css' />
    <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/js/sfhover.js"></script>
</head>
<body>
<div id="wrapper">

    <div id="header">

        <!-- TopNav -->
        <?php if($TopNavOn ): ?>
        <div id="topnav">
            <jdoc:include type="modules" name="position-13" style="xhtml" />
        </div>
        <?php endif; ?>     


        <!-- Logo -->
        <div id="logo">

            <?php if ($logo && $logoimage == 1): ?>
                <a href="<?php echo $this->baseurl ?>"><img src="<?php echo htmlspecialchars($logo); ?>"  alt="<?php echo $sitename; ?>" /></a>
            <?php endif; ?>
            <?php if (!$logo || $logoimage == 0): ?>

                <?php if ($sitetitle): ?>
                    <a href="<?php echo $this->baseurl ?>"><?php echo htmlspecialchars($sitetitle); ?></a><br/>
                <?php endif; ?>

                <?php if ($sitedescription): ?>
                    <div class="sitedescription"><?php echo htmlspecialchars($sitedescription); ?></div>
                <?php endif; ?>

            <?php endif; ?>

        </div>

        <!-- Search -->
        <div id="search">       
            <jdoc:include type="modules" name="position-0" />
        </div>
    </div>

    <div id="topmenu">
        <jdoc:include type="modules" name="position-1" />
    </div>
    <br style="clear:both" />

    <!-- Breadcrumbs -->
    <?php if ($this->countModules('position-2')): ?>
    <div id="breadcrumbs">
        <jdoc:include type="modules" name="position-2" />
    </div>
    <?php endif; ?>


    <!-- Left Menu -->
    <?php if($LeftMenuOn ): ?>
    <div id="leftmenu">
        <jdoc:include type="modules" name="position-7" style="xhtml" />
        <jdoc:include type="modules" name="position-4" style="xhtml" />
        <jdoc:include type="modules" name="position-5" style="xhtml" />
    </div>
    <?php endif; ?>


    <!-- Contents -->
    <?php if($LeftMenuOn AND $RightMenuOn): ?>
    <div id="content-w1">
    <?php elseif($LeftMenuOn OR $RightMenuOn): ?>
    <div id="content-w2">   
    <?php else: ?>
    <div id="content-w3">   
    <?php endif; ?>

        <?php if ($this->countModules('position-12')): ?>
        <div id="content-top">
            <jdoc:include type="modules" name="position-12" />
        </div>
        <?php endif; ?>

        <jdoc:include type="message" />
        <jdoc:include type="component" />
    </div>


    <!-- Right Menu -->
    <?php if($RightMenuOn ): ?>
    <div id="rightmenu">
        <jdoc:include type="modules" name="position-6" style="xhtml" />
        <jdoc:include type="modules" name="position-8" style="xhtml" />
        <jdoc:include type="modules" name="position-3" style="xhtml" />
    </div>
    <?php endif; ?>


    <!-- Footer -->
    <div id="footer">
        <jdoc:include type="modules" name="position-14" />
    </div>

    <div id="push"></div>

</div>
4

1 回答 1

4

Joomla Administrator中打开菜单模块,在选项下方找到并单击Show Sub-menu ItemsYes

于 2013-12-06T08:23:28.773 回答