Joomla Blank模板问题

时间:2013-07-12 15:23:40

标签: jquery twitter-bootstrap joomla menu width

我正在创建自己的Joomla模板,但我遇到了一些问题。

我正在使用空白模板并且正在阅读本教程:Blank Joomla template with Bootstrap

所以问题:

最初的问题是: 如果我有2个模块(span3和span 9)并且如果他想要消失“span3”span9取整个宽度,是否可能?

教程作者的答案: 尽管php有短if-else-statement:

echo ($this->countModules( 'sidebar' )) ? ('span9') : ('span12');

我的问题: 我应该把这个“简单”代码放到哪里来实现所需的结果?


如果它有帮助,这里是脚本在标题中的加载方式:

<head>
  <script type="text/javascript" src="/joomla/templates/turdi_designs/js/template.js.php"></script>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="author" content="Super User" />
  <meta name="description" content="Turdi Designs Descripcion" />
  <title>eBay</title>
  <link href="http://localhost/joomla/index.php?option=com_content&amp;view=article&amp;id=2&amp;Itemid=466" rel="canonical" />
  <link href="/joomla/templates/turdi_designs/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
  <link rel="stylesheet" href="/joomla/templates/turdi_designs/css/template.css.php?v=1.0.0" type="text/css" />
  <script src="/joomla/templates/turdi_designs/js/modernizr.js" type="text/javascript"></script>
  <script src="/joomla/templates/turdi_designs/js/jquery.js" type="text/javascript"></script>
  <script type="text/javascript">
window.addEvent('load', function() {
                new JCaption('img.caption');
            });
  </script>

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> <!-- mobile viewport -->
  <link rel="stylesheet" media="only screen and (max-width: 768px)" href="/joomla/templates/turdi_designs/css/tablet.css" type="text/css" />
  <link rel="stylesheet" media="only screen and (min-width: 320px) and (max-width: 480px)" href="/joomla/templates/turdi_designs/css/phone.css" type="text/css" />
  <!--[if IEMobile]><link rel="stylesheet" media="screen" href="/joomla/templates/turdi_designs/css/phone.css" type="text/css" /><![endif]--> <!-- iemobile -->
  <link rel="apple-touch-icon-precomposed" href="/joomla/templates/turdi_designs/apple-touch-icon-57x57.png"> <!-- iphone, ipod, android -->
  <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/joomla/templates/turdi_designs/apple-touch-icon-72x72.png"> <!-- ipad -->
  <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/joomla/templates/turdi_designs/apple-touch-icon-114x114.png"> <!-- iphone retina -->
  <!--[if lte IE 8]>
    <style> 
      {behavior:url(/joomla/templates/turdi_designs/js/PIE.htc);}
    </style>
  <![endif]-->
</head>

感谢您的时间!

1 个答案:

答案 0 :(得分:0)

我依赖于你将要做的事情。如果你要包含js或者其他东西,那么你肯定要在标题中做一些这样的事情,然后在index.php中做更多的事情。 但是,如果您只是要渲染引导带行,请将其放在您想要行的位置。基本上这只是一个条件包含,所以把它包含在你需要的地方。

查看Protostar或Beez以查看此示例。