我有这个代码,
#if ($browserSniffer.isIe($request) && $browserSniffer.getMajorVersion($request) < 8)
在 Liferay 的页面布局中告诉他们为浏览器 IE 7 使用基于表格的布局,但我收到以下警告:
Invalid character used in text string ( #if($browserSniffer.isIe($request) && $browserSniffer.getMajorVersion($request) < 8) ).
问题似乎是 AND (&&) 参数,但我没有看到任何问题。所以,如果有人能告诉我问题是什么,我将不胜感激。
在此先感谢,阿迪亚。
更新:布局文件
<div class="default-page-template" id="main-content" role="main">
#if ($browserSniffer.isIe($request) && $browserSniffer.getMajorVersion($request) < 8)
<table class="portlet-layout">
<tr>
<td class="portlet-column portlet-column-first" id="column-1">
$processor.processColumn("column-1", "portlet-column-content portlet-column-content-first")
</td>
<td class="portlet-column portlet-column-last" id="column-2">
$processor.processColumn("column-2", "portlet-column-content portlet-column-content-last")
</td>
</tr>
</table>
<table>
<tr>
<td class="portlet-column portlet-column-first" id="column-3">
$processor.processColumn("column-3", "portlet-column-content portlet-column-content-first")
</td>
</tr>
</table>
<table class="portlet-layout">
<tr>
<td class="portlet-column portlet-column-first" id="column-4">
$processor.processColumn("column-4", "portlet-column-content portlet-column-content-first")
</td>
<td class="portlet-column" id="column-5">
$processor.processColumn("column-5", "portlet-column-content portlet-column-content-last")
</td>
<td class="portlet-column portlet-column-last" id="column-6">
$processor.processColumn("column-6", "portlet-column-content portlet-column-content-last")
</td>
</tr>
</table>
<table class="portlet-layout">
<tr>
<td class="portlet-column portlet-column-last" id="column-7">
$processor.processColumn("column-7", "portlet-column-content portlet-column-content-last")
</td>
</tr>
</table>
#else
<div class="portlet-layout">
<div class="portlet-column portlet-column-first" id="column-1">
$processor.processColumn("column-1", "portlet-column-content portlet-column-content-first")
</div>
<div class="portlet-column portlet-column-last" id="column-2">
$processor.processColumn("column-2", "portlet-column-content portlet-column-content-last")
</div>
</div>
<div class="portlet-layout">
<div class="portlet-column portlet-column-first" id="column-3">
$processor.processColumn("column-3", "portlet-column-content portlet-column-content-first")
</div>
</div>
<div class="portlet-layout">
<div class="portlet-column portlet-column-first" id="column-4">
$processor.processColumn("column-4", "portlet-column-content portlet-column-content-first")
</div>
<div class="portlet-column" id="column-5">
$processor.processColumn("column-5", "portlet-column-content portlet-column-content-last")
</div>
<div class="portlet-column portlet-column-last" id="column-6">
$processor.processColumn("column-6", "portlet-column-content portlet-column-content-last")
</div>
</div>
<div class="portlet-layout">
<div class="portlet-column portlet-column-first" id="column-7">
$processor.processColumn("column-7", "portlet-column-content portlet-column-content-first")
</div>
</div>
#end
</div>