【问题标题】:Joomla Blank template issuesJoomla 空白模板问题
【发布时间】:2013-07-11 04:50:33
【问题描述】:

我正在创建自己的 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>

感谢您的宝贵时间!

【问题讨论】:

    标签: jquery twitter-bootstrap joomla menu width


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-02
      相关资源
      最近更新 更多