Skip to content

How to use own templates #5

@gergap

Description

@gergap

Hi,

I need to use a slightly modified TT2 template,
but at the moment I don't see a way to use it,
because both absolute and relative paths are not allowed.
Maybe this was different in older versions of TT or I overlook something.

By default the code searches for the template in /usr/share/perl5, the default perl5 installation path on Debian Linux.

using the options prove -l -m -P HTML=outfile:html/index.html,template:/path/to/ansi_report.tt2 ...
you get this error:
file error - /path/to/ansi_report.tt2: absolute paths are not allowed (set ABSOLUTE option)

using the options "HTML=outfile:html/index.html,template:../path/to/ansi_report.tt2"
file error - ../path/to/ansi_report.tt2: relative paths are not allowed (set RELATIVE option)

To fix this we we need to change the code in HTML.pm to allow ABSOLUTE
see also http://www.template-toolkit.org/docs/manual/Config.html#section_ABSOLUTE

As a temp. workaround I copy the template into /usr/share/perl5. But that's abviously not a good solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions