Yep, you can use the <block condition="(perl expression)"> ...
</block> construct.
Example: the following document testtable.html will render itself
differently (i.e., with a different "right side") based on the query
string parameters passed to it. The condition uses the &EXT function
to access query string parameters passed to the html-page.
<html>
<head>
<title>
Title of Document Goes Here
</title>
</head>
<body bgcolor="#FFFFFF">
<table>
<tr><td width="50%" bgcolor="#BBBBBB"><h1>Left Side</h1><a href="testtable.html?show=a">Show A</a>
<a href="testtable.html?show=b&color=blue">Show B in blue</a>
bla bla
<a href="testtable.html?show=b&color=red">Show B in red</a>
bla bla bla bla
<a href="testtable.html?show=b">Show B</a>
</td>
<td bgcolor="#BBFFBB">
<h1>Right Side</h1>
<block condition="&EXT('query.show') eq 'a'">
<h2>I am A</h2>
Bla bla ...
</block>
<block condition="&EXT('query.show') eq 'b'">
<block condition="&EXT('query.color') eq 'blue'">
I will be blue!!!
</block>
<block condition="&EXT('query.color') eq 'red'">
I will be red!!!
</block>
<h2>I am B</h2>
Bla bla
</block>
</td>
</tr>
</table>
</body>
</html> |