in reply to template toolkit question -- metadata
The TT2 documentation says:
The META directive allows simple metadata items to be defined within a template. These are evaluated when the template is parsedThat means that the last value assigned to a META item will 'win', so to speak, as the conditional can't be and isn't evaluated during parse-time - change the order of the conditional, and the title should always display "BOOK".
Edit: I experimented a bit with the following template
and ttree to test my hypothesis, and I seem to interpret the documentation correctly:[% SET type = "D" %] [% IF type == 'B'; META title = 'Book'; ELSIF type == 'D'; META title = 'DVD'; ELSE; META title = 'CD'; END; -%] - [% template.title %] / [% type %] / [% template.name %] / [% templa +te.modtime %] - [% META title = 'LAST' %]
- LAST / D / test.tt2 / 1178881986 -
An intellectual is someone whose mind watches itself.
-- Albert Camus