我已经定制了我的Joomla模板,通过添加Bootstrap尝试响应式获取导航栏工作...我遇到的问题是响应式导航栏的菜单按钮没有响应并且在我的菜单上方的桌面上显示所有时间。
<?php
/**
* Date July 31, 2014
* Copyright Copyright (C) 2014 10templates.com
* License GPL
*/
defined( '_JEXEC' ) or die;
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
$doc->addStyleSheet('templates/'.$this->template.'/css/bootstrap.min.css');
$doc->addStyleSheet('templates/'.$this->template.'/css/bootstrap.css');
JHtml::_('bootstrap.framework');
?>
<?php include_once("analyticstracking.php") ?>
<!DOCTYPE html>
<html xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"/>
<meta name="HandheldFriendly" content="true"/>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/menu.js">"</script>
<script type="text/css" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/bootstrap-responsive"></script>
</head>
<body>
<!--main container -->
<div class="container-fluid">
<!--Begin header-->
<div class="header">
<div class="header-inner">
<jdoc:include type="modules" name="position-2" style="none" />
<header class="jumbotron">
<img src="<?php echo $this->baseurl ?>/images/utv_pics/utv_transparent.gif" style="max-width:100%">
<!--Begin Navbar-->
<?php if ($this->countModules('position-1')) : ?>
<div class="nav2">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#nav2">Menu
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!--a class="brand" href="#"><?php echo $sitename ?></a-->
<div class="collapse nav-collapse" id="#nav2">
<jdoc:include type="modules" name="position-1" style="none" />
<!--End navbar-->
<?php endif; ?>
</div></nav></div></header></div></div>
<div class="container-fluid">
<div class="clearfix">
<div class="leftCont"></div>
<div id="content" role="main">
<?php if ($this->countModules('position-9')) : ?>
<div class="banners">
<jdoc:include type="modules" name="position-9" style="none" />
</div>
<?php endif; ?>
<!-- Begin Content -->
<div class="insider">
<jdoc:include type="component" />
<jdoc:include type="modules" name="position-3" style="none" />
</div>
<!-- End Content -->
</div>
<div class="rightCont">
<div class="clearfix"></div>
</div></div></div>
<div class="container-fluid">
<footer class="clearfix">
<section>
<?php if ($this->countModules('position-4')) : ?>
<jdoc:include type="modules" name="position-4" style="xhtml" />
<?php endif; ?>
</section>
<section>
<?php if ($this->countModules('position-5')) : ?>
<jdoc:include type="modules" name="position-5" style="xhtml" />
<?php endif; ?>
</section>
<section>
<?php if ($this->countModules('position-6')) : ?>
<jdoc:include type="modules" name="position-6" style="xhtml" />
<?php endif; ?>
</section>
</footer>
</div></div>
<script src="/test/media/jui/js/bootstrap.min.js" type="text/javascript"> </script>
<script src="/test/media/jui/css/bootstrap.min.css" type="text/css"> </script-->
<?php $doc->addScript('templates/'.$this->template.'/js/bootstrap.min.js'); ?>
</body>
</html>
</body>
</html>