in reply to Date-sensitive output with Template Toolkit
The TT code would look something like thissub ByDate { my ($self, $text, $args, $conf) = @_; # Do appropriate time formatting $cooked_now = TimeFormat(time); if($cooked_now > $args->[0] && $cooked_now < $args->[1]) { return $text; } else { return ""; } }
As I said, I forget exactly how the linkage between MyFilter and your code works, I do remember it's explained very well in the docs. Hope this helps.[% USE MyFilter %] [% FILTER $MyFilter <start> <end> %] Don't display this before <start> or after <end> [% END %]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date-sensitive output with Template Toolkit
by Clachair (Acolyte) on Apr 06, 2006 at 00:06 UTC |