# Template.yml per-project includes

**URL:** <https://community.shotgridsoftware.com/t/template-yml-per-project-includes/3681>\
**Category:** Pipeline Integrations\
**Created:** [November 6, 2019, 3:53pm UTC](https://community.shotgridsoftware.com/t/template-yml-per-project-includes/3681 "2019-11-06T15:53:39Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![tannaz](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/tannaz/32/32_2.png) [@tannaz](https://community.shotgridsoftware.com/u/tannaz)\
**Post date:** [November 7, 2019, 12:24am UTC](https://community.shotgridsoftware.com/t/template-yml-per-project-includes/3681/7 "2019-11-07T00:24:33Z")

</div>

Hey Patrick -

I added this line to `templates.yml` and it worked:

`include: "${INCLUDE_PATH}/test.yml"`

so we definitely do support env vars in template includes.

As for _when_ to set the env var, `pipeline_configuration_init` is the right place, and it looks like you can get to the project name via `self.parent`.

Here’s where the project is getting set and the `pipeline_configuration_init` core hook is getting executed (conveniently adjacent to one another 🙂 ). You can see that the core hook is getting called with `parent=self` (looks like the snippet got cut off – click through to see that line):

> <https://github.com/shotgunsoftware/tk-core/blob/887fd69ac88132a3355d94960d793ea9ebfdc568/python/tank/pipelineconfig.py#L241-L267>

So, I just tested referring to `self.parent._project_name` in the core hook and it worked.

Hope that helps!

---

_[View the full topic](https://community.shotgridsoftware.com/t/template-yml-per-project-includes/3681)._
