Pass declared variables in template to includes

This is not the best solution, but it did solve my problem.
Perhaps you can find a better solution for that.