Skip to content

Unable to include relative TT templates from within another template #1093

@abeverley

Description

@abeverley

#1037 removed the default include path for TT templates. Whilst there were good reasons for this, it now means that by default a relative template cannot be included from another template. E.g. any application that was doing [% PROCESS another_template.tt %] will now be broken.

The simple fix is to define INCLUDE_PATH in the TT config. This is undesirable though, as it requires an absolute path.

Can I suggest as a solution that a new configuration option is added to the template_toolkit configuration to enable the default include path as $self->views so as to save hard-coding paths into the config?

If the above sounds okay, I will be happy to supply a PR.

Thanks,

Andy

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions