Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery Joomla空白模板问题_Jquery_Twitter Bootstrap_Joomla_Menu_Width - Fatal编程技术网

Jquery Joomla空白模板问题

Jquery Joomla空白模板问题,jquery,twitter-bootstrap,joomla,menu,width,Jquery,Twitter Bootstrap,Joomla,Menu,Width,我正在创建自己的Joomla模板,但遇到了一些问题 我使用的是空白模板,我正在学习本教程: 因此,问题是: 原来的问题是: 如果我有两个模块(span3和span 9),如果他想在消失时“span3”span9占据整个宽度,是否可能 本教程作者的回答是: 可以通过php使用简短的if-else语句: echo ($this->countModules( 'sidebar' )) ? ('span9') : ('span12'); 我的问题: 我应该把这个“简单”的代码放在哪里以实现所需的

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

我使用的是空白模板,我正在学习本教程:

因此,问题是: 原来的问题是: 如果我有两个模块(span3和span 9),如果他想在消失时“span3”span9占据整个宽度,是否可能

本教程作者的回答是: 可以通过php使用简短的if-else语句:

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>

易趣网
window.addEvent('load',function(){
新JCaption('img.caption');
});

谢谢你抽出时间

我取决于你在这个基础上要做什么。如果要包含js或其他内容,那么请确定您希望在标题中执行其中一些操作,然后在index.php中执行更多操作。 但是,如果您只想渲染引导行,请将其放在希望该行的位置。基本上这只是一个条件包含,所以在需要的地方包含它

看看Protostar或Beez中的例子