[Templates] Last-modified date
Keith G. Murphy
keithmur@mindspring.com
Thu, 03 Aug 2000 11:25:29 -0500
Andy Wardley wrote:
>
> On Aug 2, 10:38am, Rafael Kitover wrote:
> > [% PERL %]
> > use HTTP::Date;
> > $stash->{mod_time} = time2str(time);
> > [% END %]
> >
> > in the top level template, then just
> >
> > Last modified: [% mod_time %]
>
Won't that (using 'time') just give me the latest time any template is
*processed* at?
>
> Version 2 defines a 'template' data structure which contains meta-information
> about the main template you're processing. It doesn't yet support a
> 'modtime' variable, but you can be sure it will by the next beta! :-)=
>
> That will allow you to do this:
>
> [% USE Date %]
> Last modified: [% date.format(template.modtime) %]
>
Will I be able to get the modtime of whatever template I'm processing,
or just the main template (top of the tree)? The former is what would
be needed.