Hi TrixieTang
Here are a couple of things that might help – there are two ways to “attempt to use it” both of which ought to be installed as part of Template::Toolkit.
Generating Output
tpage
You need to specify the extension of the include files (and location of said include files if they're not in the current working directory). So your example.tt file will look like this:
[% INCLUDE header.tt
title = 'This is an HTML example';
pages = [
{ url = 'http://foo.org'
title = 'The Foo Organisation'
}
{ url = 'http://bar.org'
title = 'The Bar Organisation'
}
]
%]
<h1>Some Interesting Links</h1>
<ul>
[% FOREACH page IN pages %]
<li><a href="[% page.url %]">[% page.title %]</a>
[% END %]
</ul>
[% INCLUDE footer.tt %]
…and the command to generate your output could look something like:
tpage --relative --include_path='relative path/to/header.tt and footer.tt' example.tt
ttree
This requires a bit more setup and can be fiddly at first but is worth it…
Good Luck! Shadowsong |