On Mar 27, 2006, at 17:42, Eric Ladner wrote:
I'm walking into the middle of an already installed and running
project that uses the Template Toolkit and have a question or two
about some strange things I'm seeing...
I'm trying to modify some of the ".tmpl" files to change the html
to a new look/feel to match the rest of a web site that's been
converted already. When I make changes to the template files
( e.g. I'm putting new HTML content in a header.tmpl that's
included in other files), the requested pages through the site
don't show the new content.
I poked around and found the ".tmpl.ttc" files (precompiled/cached
files) and they do not appear to be getting updated to reflect
changes in their corresponding ".tmpl" file.
Oddly enough, if I run tpage on the header.tmpl file, it shows the
correct output.
Is there some manual process to updated the .ttc files? I'm not
sure if there's some larger problem (permissions, etc) but at this
point, if I could get everything in sync, I'd be making progress.
Thanks in advance,
Eric Ladner
Erich
I think your problem may well be quite simple.
You are using ttree to generate the output I assume? As far as I can
see, tpage uses compiled templates just as ttree so I can't help
there but your problem might be that included files (PROCESS WRAPPER
INCLUDE and INSERT all behave the same in this case I believe) don't
trigger ttree to regenerate the including file. ttree simply compares
times on the input and output file. There are two ways around this -
the easy one and the right one - you can touch the top level
templates or you can look up the 'depend' configuration flag for
ttree. If you had, for example, a global wrapper file that you
used like:
[% WRAPPER include/mywrapper %]
... all sorts of page content ...
[% END %]
in all your files you could add the following line to you ttree
config file:
depend *=include/mywrapper
Ttree would then compare the later of the modtimes on your main
template and the include/mywrapper file with the output file.
The cached files won't be updated unless ttree decides the files need
processing.
HTH
nic
--
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates