You can't call Perl code directly from templates, so you have 2 solutions, I think: - have your controller pass variables to your template indicating which beta features the user has turned on. Then you can do something like [% IF uaerhasbeta.featurename %] [% dw.need_res( 'js/featurename.js' ) %] [% ENDIF %] (syntax not guaranteed) - write a TT plugin (see cgi-bin/DW/Template/Plugin.pm and cgi-bin/DW/Template/Plugin/*) (being vague here, because I'm unsure of my footing)
Which is best depends on how many templates would need to test for beta features and whether this change is strictly localized to the templates, or if it affects the controllers as well.
no subject
- have your controller pass variables to your template indicating which beta features the user has turned on. Then you can do something like [% IF uaerhasbeta.featurename %] [% dw.need_res( 'js/featurename.js' ) %] [% ENDIF %] (syntax not guaranteed)
- write a TT plugin (see cgi-bin/DW/Template/Plugin.pm and cgi-bin/DW/Template/Plugin/*) (being vague here, because I'm unsure of my footing)
Which is best depends on how many templates would need to test for beta features and whether this change is strictly localized to the templates, or if it affects the controllers as well.