PATH=/ HTML='''

Test IF/FOREACH Expr

Outer IF
{{{!IF ThisValue==true}}}
  ThisValue is true.
{{{!FOREACH ArrayValue}}} {{{!IF ThisOtherValue==true}}} {{{ArrayValue}}}
ThisOtherValue is true.
{{{Var}}}
{{{!ELSE}}} {{{ArrayValue}}}
ThisOtherValue is NOT true.
{{{Var}}}
{{{!ENDIF}}} {{{!ENDFOREACH}}} {{{!ELSE}}} ThisValue is NOT true.
{{{!FOREACH ArrayValueSecond}}} {{{!IF ThisOtherValue==true}}} {{{ArrayValueSecond}}}
ThisOtherValue is true.
{{{Var}}}
{{{!ELSE}}} {{{ArrayValueSecond}}}
ThisOtherValue is NOT true.
{{{Var}}}
{{{!ENDIF}}} {{{!ENDFOREACH}}} {{{!ENDIF}}}

Outer FOREACH
{{{!FOREACH ArrayValue}}}
  {{{ArrayValue}}}
{{{!IF ThisValue==true}}} ThisValue is true.
{{{!FOREACH ArrayValueSecond}}} {{{ArrayValueSecond}}}
{{{!IF ThisOtherValue==true}}} ThisOtherValue is true.
{{{Var}}}
{{{!ELSE}}} ThisOtherValue is NOT true.
{{{Var}}}
{{{!ENDIF}}} {{{!ENDFOREACH}}} {{{!ELSE}}} ThisValue is NOT true.
{{{!FOREACH ArrayValueSecond}}} {{{ArrayValueSecond}}}
{{{!IF ThisOtherValue==true}}} ThisOtherValue is true.
{{{Var}}}
{{{!ELSE}}} ThisOtherValue is NOT true.
{{{Var}}}
{{{!ENDIF}}} {{{!ENDFOREACH}}} {{{!ENDIF}}} {{{!ENDFOREACH}}}

Nested FOREACH:
{{{!FOREACH ArrayValue}}}
  {{{ArrayValue}}}
  {{{!FOREACH ArrayValueSecond}}}
    {{{ArrayValueSecond}}}
    {{{!FOREACH ArrayValueThird}}}
      {{{ArrayValueThird}}}
      {{{!FOREACH ArrayValueFourth}}}
        {{{ArrayValueFourth}}}
      {{{!ENDFOREACH}}}
    {{{!ENDFOREACH}}}
  {{{!ENDFOREACH}}}
{{{!ENDFOREACH}}}

inner

''' 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''' PATH=/inner HTML_FILE='''example_config/inner.html''' VAR_FILE='''example_config/var.html''' PATH=/error PATH=/inner/further HTML='''

Nested inner: further

{{{VAR}}}

back ''' VAR='''yep'''