Actually, there is a clean third way of doing this.
- Create an new .adp file. Let's call it headerstuff.adp containing:
<if @condition_1@>Item 1</if>
<if @condition_2@>Item 2</if>
- Call headerstuff.adp from the .tcl file you would like to use property header_stuff in:
set cwd [file dirname [ad_conn file]]
set headerstuff [template::adp_parse ${cwd}/headerstuff \
[list \
condition_1 $condition_1 \
condition_2 $condition_2]]
- Then pass the header_stuff property like so:
<property name="header_stuff">@headerstuff@</property>
/Bart