[Catalyst] Process Template Toolkit Layouts

Tobias Kremer list at funkreich.de
Fri Feb 1 08:59:49 GMT 2008


Hi Jennifer,

Quoting Jennifer Ahn <jenahn at stanford.edu>:
> i configured my WRAPPER path to be root/lib/site/wrapper
> where in my root/lib/site/wrapper file:
> [% PROCESS layout %]
> "layout" is under root/lib/stite/html but my application is looking for
> the "layout" file in root/src

I'm not sure I'm understanding your problem correctly but it sounds like
configuring TT's INCLUDE_PATH might help. Try something like the following
in your MyApp::View::TT:

__PACKAGE__->config( {
  ...
  INCLUDE_PATH  => [
    MyApp->path_to( 'root', 'lib', 'site', 'html' );
    MyApp->path_to( ... other paths where tt should look for templates ... );
} );

You may want to take a look at the TT configuration manual:

http://www.template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH

Furthermore, the manual says the following about INCLUDE/PROCESS:

"If a BLOCK definition is not currently visible then the template name
should be a file !!relative to one of the INCLUDE_PATH directories!!, or an
absolute or relative file name if the ABSOLUTE/RELATIVE options are
appropriately enabled."

http://www.template-toolkit.org/docs/manual/Directives.html#section_INCLUDE

HTH,

--Tobias



More information about the Catalyst mailing list