# Using include files as from Perl template toolkit

**URL:** https://forum.pinegrow.com/t/using-include-files-as-from-perl-template-toolkit/938
**Category:** General
**Created:** [May 19, 2017, 5:25am UTC](https://forum.pinegrow.com/t/using-include-files-as-from-perl-template-toolkit/938 "2017-05-19T05:25:05Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![rbl](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rbl](https://forum.pinegrow.com/u/rbl)
#### Post date: [May 22, 2017, 2:02am UTC](https://forum.pinegrow.com/t/using-include-files-as-from-perl-template-toolkit/938/2 "2017-05-22T02:02:10Z")

</div>

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](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?

---

_[View the full topic](https://forum.pinegrow.com/t/using-include-files-as-from-perl-template-toolkit/938)._
