我正在創建一個響應模板,併爲此發生我需要使用,如果其他和功能。這是我迄今爲止所擁有的。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