Using include files as from Perl template toolkit

I have experimented with a few things, and this approach seems to work:

Make an additional page, we’ll call it PGtemplate.tt2:

[% include head.inc %]

<div id="insert"></div>

[% include foot.inc %]

Run that page thought the template postprocessor to generate the complete HTML file, PGtemplate.html, which contains all of the header and footer files, but only this #insert DIV as the “body” of the page.

Open a Project in Pinegrow in the directory where your source files are. Right click on the file you want to edit and select Open as Partial, then put “PGtemplate.html” and “#insert” in the fields in the dialog box. This is explained further in http://docs.pinegrow.com/pinegrow-pro/partials/working-with-partials.

You will still see text like " [% include head.inc %]" somewhere in the page display, but you can edit the pages with the full styling you would get from the template.

Does anyone have any better ideas or suggestions?

1 Like