我正在创建一个响应模板,并为此发生我需要使用,如果其他和功能。这是我迄今为止所拥有的。joomla模块的位置,如果其他和
<?php if ($this->countModules('left')) { ?>
<p>Left + Content</p>
<?php } elseif ($this->countModules('right')) { ?>
<p>Right + Content</p>
<?php } elseif ($this->countModules('left')) && ($this->countModules('right')) { ?>
<p>Left + Right + Content</p>
<?php } else { ?>
<p>Content</p>
<?php } ?>
我现在收到错误: 解析错误:语法错误,意想不到的 '& &'(T_BOOLEAN_AND)中的index.php上线197
线197 =
<?php } elseif ($this->countModules('left')) && ($this->countModules('right')) { ?>
我曾尝试添加一个额外的()但没有工作:
<?php } elseif (($this->countModules('left')) && ($this->countModules('right'))) { ?>
我忘了一些事情,但是什么。
您正在'&&'之前关闭'elseif'。 – inigomedina 2015-03-13 13:50:19