I have to display different medical forms according to which state the user is in. There is also a default form that many of the states share. These medical forms are all written in Template Toolkit and they are included in larger templates. The state is available as a variable in a normalized form.
I need to select the state-specific template, if it exists, otherwise fall back to the default. How would I best go about doing this?
INCLUDE_PATH is already being used to control switching between site styles.
Something like this should do the job:
main.tt:
default.tt:
s1.tt:
t.pl:
When running
t.pl: