235 lines
4.8 KiB
Text
235 lines
4.8 KiB
Text
PATH=/
|
|
HTML='''
|
|
<html>
|
|
<head>
|
|
<style>
|
|
body {
|
|
color: #FFF;
|
|
background-color: #333;
|
|
}
|
|
a {
|
|
color: #AAF;
|
|
}
|
|
a:link {
|
|
color: #AAF;
|
|
}
|
|
a:visited {
|
|
color: #88B;
|
|
}
|
|
a:focus a:hover {
|
|
color: #DDF;
|
|
}
|
|
a:active {
|
|
color: #FFF;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h2><a href="/inner">inner</a></h2><br>
|
|
<h2>Test EachIf Expr</h2>
|
|
|
|
{{{!FOREACH EachIfTest_Array}}}
|
|
{{{!IF EachIfTest_Array==true}}}
|
|
EachIfTest_Array entry is <b>true</b>. <br>
|
|
{{{!ELSE}}}
|
|
EachIfTest_Array entry is <b>false</b>. <br>
|
|
{{{!ENDIF}}}
|
|
{{{!ENDFOREACH}}}
|
|
|
|
Again with IFs:<br>
|
|
|
|
{{{!IF EachIfTest_Array[0]==true}}}
|
|
EachIfTest_Array entry is <b>true</b>. <br>
|
|
{{{!ELSE}}}
|
|
EachIfTest_Array entry is <b>false</b>. <br>
|
|
{{{!ENDIF}}}
|
|
{{{!IF EachIfTest_Array[1]==true}}}
|
|
EachIfTest_Array entry is <b>true</b>. <br>
|
|
{{{!ELSE}}}
|
|
EachIfTest_Array entry is <b>false</b>. <br>
|
|
{{{!ENDIF}}}
|
|
{{{!IF EachIfTest_Array[2]==true}}}
|
|
EachIfTest_Array entry is <b>true</b>. <br>
|
|
{{{!ELSE}}}
|
|
EachIfTest_Array entry is <b>false</b>. <br>
|
|
{{{!ENDIF}}}
|
|
{{{!IF EachIfTest_Array[3]==true}}}
|
|
EachIfTest_Array entry is <b>true</b>. <br>
|
|
{{{!ELSE}}}
|
|
EachIfTest_Array entry is <b>false</b>. <br>
|
|
{{{!ENDIF}}}
|
|
|
|
<br>
|
|
<h2>Test IF/FOREACH Expr</h2>
|
|
|
|
Outer IF<br>
|
|
<pre>
|
|
{{{!IF ThisValue==true}}}
|
|
ThisValue is <b>true</b>.<br>
|
|
{{{!FOREACH ArrayValue}}}
|
|
{{{!IF ThisOtherValue==true}}}
|
|
{{{ArrayValue}}}<br>
|
|
ThisOtherValue is <b>true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ELSE}}}
|
|
{{{ArrayValue}}}<br>
|
|
ThisOtherValue is <b>NOT true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ENDIF}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ELSE}}}
|
|
ThisValue is <b>NOT true</b>.<br>
|
|
{{{!FOREACH ArrayValueSecond}}}
|
|
{{{!IF ThisOtherValue==true}}}
|
|
{{{ArrayValueSecond}}}<br>
|
|
ThisOtherValue is <b>true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ELSE}}}
|
|
{{{ArrayValueSecond}}}<br>
|
|
ThisOtherValue is <b>NOT true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ENDIF}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ENDIF}}}
|
|
</pre><br>
|
|
|
|
Outer FOREACH<br>
|
|
<pre>
|
|
{{{!FOREACH ArrayValue}}}
|
|
{{{ArrayValue}}}<br>
|
|
{{{!IF ThisValue==true}}}
|
|
ThisValue is <b>true</b>.<br>
|
|
{{{!FOREACH ArrayValueSecond}}}
|
|
{{{ArrayValueSecond}}}<br>
|
|
{{{!IF ThisOtherValue==true}}}
|
|
ThisOtherValue is <b>true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ELSE}}}
|
|
ThisOtherValue is <b>NOT true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ENDIF}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ELSE}}}
|
|
ThisValue is <b>NOT true</b>.<br>
|
|
{{{!FOREACH ArrayValueSecond}}}
|
|
{{{ArrayValueSecond}}}<br>
|
|
{{{!IF ThisOtherValue==true}}}
|
|
ThisOtherValue is <b>true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ELSE}}}
|
|
ThisOtherValue is <b>NOT true</b>.<br>
|
|
{{{Var}}}<br>
|
|
{{{!ENDIF}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ENDIF}}}
|
|
{{{!ENDFOREACH}}}
|
|
</pre><br>
|
|
|
|
Nested FOREACH:<br>
|
|
<pre>
|
|
{{{!FOREACH ArrayValue}}}
|
|
{{{ArrayValue}}}
|
|
{{{!FOREACH ArrayValueSecond}}}
|
|
{{{ArrayValueSecond}}}
|
|
{{{!FOREACH ArrayValueThird}}}
|
|
{{{ArrayValueThird}}}
|
|
{{{!FOREACH ArrayValueFourth}}}
|
|
{{{ArrayValueFourth}}}
|
|
{{{!FOREACH Each_FILE}}}
|
|
{{{Each_FILE}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ENDFOREACH}}}
|
|
{{{!ENDFOREACH}}}
|
|
</pre>
|
|
|
|
<br><h2><a href="/inner">inner</a></h2>
|
|
</body>
|
|
</html>
|
|
'''
|
|
|
|
Var='''Test var value'''
|
|
ThisValue=true
|
|
ThisOtherValue=true
|
|
|
|
ArrayValue=1_IDX_Zero
|
|
ArrayValue=1_IDX_One
|
|
ArrayValue=1_IDX_Two
|
|
|
|
ArrayValueSecond=2_IDX_Zero
|
|
ArrayValueSecond=2_IDX_One
|
|
ArrayValueSecond=2_IDX_Two
|
|
|
|
ArrayValueThird=3_IDX_Zero
|
|
ArrayValueThird=3_IDX_One
|
|
ArrayValueThird=3_IDX_Two
|
|
|
|
ArrayValueFourth=4_IDX_Zero
|
|
ArrayValueFourth=4_IDX_One
|
|
ArrayValueFourth=4_IDX_Two
|
|
|
|
EachTestHead='''First Entry Head'''
|
|
EachTestMid='''First Entry Mid'''
|
|
EachTestTail='''First Entry Tail'''
|
|
|
|
EachTestHead='''Second Entry Head'''
|
|
EachTestMid='''Second Entry Mid'''
|
|
EachTestTail='''Second Entry Tail'''
|
|
|
|
EachTestHead='''Third Entry Head'''
|
|
EachTestMid='''Third Entry Mid'''
|
|
EachTestTail='''Third Entry Tail'''
|
|
|
|
Each_FILE='''example_config/each_file_zero.html'''
|
|
Each_FILE='''example_config/each_file_one.html'''
|
|
Each_FILE='''example_config/each_file_two.html'''
|
|
|
|
EachIfTest_Array=false
|
|
EachIfTest_Array=true
|
|
EachIfTest_Array=false
|
|
EachIfTest_Array=true
|
|
|
|
PATH=/inner
|
|
HTML_FILE='''example_config/inner.html'''
|
|
VAR_FILE='''example_config/var.html'''
|
|
|
|
PATH=/error
|
|
|
|
PATH=/inner/further
|
|
HTML='''
|
|
<html>
|
|
<head>
|
|
<style>
|
|
body {
|
|
color: #FFF;
|
|
background-color: #333;
|
|
}
|
|
a {
|
|
color: #AAF;
|
|
}
|
|
a:link {
|
|
color: #AAF;
|
|
}
|
|
a:visited {
|
|
color: #88B;
|
|
}
|
|
a:focus a:hover {
|
|
color: #DDF;
|
|
}
|
|
a:active {
|
|
color: #FFF;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Nested inner: further<h1>
|
|
{{{VAR}}}
|
|
<br>
|
|
<img src="/silly.jpg" />
|
|
<br>
|
|
<a href="/inner">back</a>
|
|
</body>
|
|
</html>
|
|
'''
|
|
VAR='''yep'''
|